From: Ross R. <rr...@cs...> - 2012-05-17 20:56:40
|
Pete Batard writes: > On the other hand, it seems that, for en_US, cp437 is being used ... It's using CP1252, the Microsoft extendend version of ISO 8859-1, and it should be using this character set in the Irish locale as well. The difference in behaviour is just because the locales specify different sets of upper and lower case letters You may be confused because what you're seeing on screen is in a different code page. If you're using a standard console window then its probably using CP437, but this doesn't affect the character set that the C runtime library uses. >Still, the same program compiled with MSVC returns a "C" locale >everywhere, so there's a difference between the MinGW and MSVC behaviour >there. This is explained by the fact that MinGW and fmifs.dll use the same C runtime (MSVCRT.DLL) while your version of MSVC uses different one (MSVCR100.DLL). Each has their own idea of what the locale is. You probably need to rethink completely how you handle characters sets in your application. You may not be able to rely on the C runtime library the way you expect to. You're definitely going to need a better understanding of how Windows uses character sets, notably the difference between the "OEM" and "ANSI" character sets. Windows only supports the OEM character sets like CP437 in a few places, like console windows and filenames. Most of the rest of Windows only supports Unicode and the ANSI code pages. Ross Ridge |