C Writting to a file in Unicode
Posted
by Lefteris
on Stack Overflow
See other posts from Stack Overflow
or by Lefteris
Published on 2010-03-11T17:46:40Z
Indexed on
2010/03/11
17:49 UTC
Read the original article
Hit count: 188
Hey all, I am having some problems writting to a file in unicode inside my c program. I am trying to write a unicode Japanese string to a file. When I go to check the file though it is empty. If I try a non-unicode string it works just fine. What am I doing wrong?
setlocale(LC_CTYPE, "");
FILE* f;
f = _wfopen(COMMON_FILE_PATH,L"w");
fwprintf(f,L"???");
fclose(f);
© Stack Overflow or respective owner