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



Igor Zlatkovic <igor zlatkovic com> wrote:
Right on Linux, wrong on Windows. I haven't involved myself much with 
these details, but here is what I believe true.

Yes, Win32 filenames are character strings, not byte strings (but e.g. 
there is no internal normalization, so you should better give them all in 
in Unicode NFC). So when you are switching default codepages on your 
systems, the "look" (character content) of the filenames stay the same, 
but the byte strings seen by programs using 8-bit interfaces change.

The MSFT way to I18n is to use internally UTF-16, and UTF-8 support
is rather weak (UTF-8 is codepage 65001, BTW).

Ideally either a) Win32 or b) the compiler's RTL should be able to 
be told to interpret all 8-bit strings as UTF-8. But

for a) I haven't found a way (there's a GetThreadACP, but no SetThreadACP)

for b) there is a _setmbcp (approximately) in MSVC RTL, but to my best 
knowledge, it's not consistently affecting all file related functions.

If anybody knows a way out of this, I would be very thankful to hear about.

Best Regards,
Peter Jacobi




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