Hirokazu Yamamoto <[EMAIL PROTECTED]> added the comment:

I'm not cygwin user, but cygwin seems not to support multibyte function.
Following program outputs 5 on VC6 as expected, but 10 on cygwin. 
Hmm...

#include <stdio.h>
#include <stdlib.h>
#include <locale.h>

int main(int argc, char* argv[])
{
        const char s[] = "あいうえお";
        size_t len;
        wchar_t *buf;

        setlocale(LC_ALL, "");

        len = strlen(s); /* 10 */

        buf = (wchar_t*)malloc((len+1)*sizeof(wchar_t));

        len = mbstowcs(buf, s, len+1);

        printf("--------> %d\n", len); /* should be 5 */

        return 0;
}

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3824>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to