15,440
社区成员
发帖
与我相关
我的任务
分享
// cmpiled with msvc14
#include <stdlib.h>
#include <assert.h>
int __stdcall main()
{
printf("%ls\n", L"中国"); // nothing
_printf_l("%ls\n", NULL, L"中国"); // nothing
assert(_create_locale(LC_CTYPE, "chs") != NULL); // pass
_printf_l("%ls\n", _create_locale(LC_CTYPE, "chs"), L"中国"); // nothing
_printf_l("%ls\n", _create_locale(LC_ALL, "chs"), L"中国"); // nothing
setlocale(LC_CTYPE, "chs");
printf("%ls\n", L"中国"); // ok
_printf_l("%ls\n", NULL, L"中国"); // ok
return 0;
}