Re: [xml] Default Catalog On Windows, Deprecated API



If only to amuse those, who don't have to struggle with it:

Igor wrote:
_setmbcp can, at best, use the encoding specified in a previous call to
setlocale. Neither it nor setlocale affects file operations. They affect
things like date formats, string collation and their likes.

Perhaps in the standard, but not in MSVC:
http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/vccore98/html/_crt__setmbcp.asp

There are:
1) RTL functions, which always use the character set implied from setlocale
e.g. mbstowcs

2) RTL functions, which will use the character set given by setmbcp, which 
may or may not be the same as in 1)
e.g. _stat, spawn

3) RTL functions which give zilch about 1) and 2) and only use the current 
thread's code page.
e.g. fopen, open

The current versions of Windows won't help you by converting the 
internal UTF-16 file names to UTF-8 on the fly. This could change in the
future, but I wouldn't count on it.

I'd give much for SetThreadCP (65001)

Regards,
Peter Jacobi




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]