I18N FAQ on Visual C++

I18N FAQ on Visual C++


I am reading a Unicode file Using fgetws(). But I get null embedded strings. why?

I am reading a Unicode file Using fgetws(). But I get null embedded strings. why?

For reading Unicode string in VC++ you should open the file in binary mode. See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_unicode.99_.stream_i.2f.o_in_text_and_binary_modes.asp for details.
This applies to any stream I/O routine such as fwprintf, fwscanf, fgetwc, fputwc, fgetws, or fputws.

0 Comments:

Post a Comment

<< Home