Message73580
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;
} |
|
Date |
User |
Action |
Args |
2008-09-22 14:49:13 | ocean-city | set | recipients:
+ ocean-city, loewis, amaury.forgeotdarc |
2008-09-22 14:49:13 | ocean-city | set | messageid: <1222094953.62.0.586992543706.issue3824@psf.upfronthosting.co.za> |
2008-09-22 14:48:13 | ocean-city | link | issue3824 messages |
2008-09-22 14:48:12 | ocean-city | create | |
|