This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ocean-city
Recipients amaury.forgeotdarc, loewis, ocean-city
Date 2008-09-22.14:48:12
SpamBayes Score 7.0739657e-06
Marked as misclassified No
Message-id <>
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. 

#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:13ocean-citysetrecipients: + ocean-city, loewis, amaury.forgeotdarc
2008-09-22 14:49:13ocean-citysetmessageid: <>
2008-09-22 14:48:13ocean-citylinkissue3824 messages
2008-09-22 14:48:12ocean-citycreate