Well, I'm not sure about that. The complexity of codepage settings on a
Windows system makes the whole afair a guesswork which will always tend
to do the wrong thing anyway. There are the following codepages available:
- The current input console codepage, GetConsoleCP().
- The current output console codepage, GetConsoleOutputCP().
- The current OEM codepage, GetOEMCP().
- The current ANSI codepage, GetACP().
- The default OEM codepage of the default system locale,
GetLocaleInfo (LOCALE_SYSTEM_DEFAULT, LOCALE_IDEFAULTCODEPAGE, ...).
- The default ANSI codepage of the default system locale,
GetLocaleInfo (LOCALE_SYSTEM_DEFAULT, LOCALE_IDEFAULTANSICODEPAGE, ...).
- The default OEM codepage of the current user or process,
GetLocaleInfo (LOCALE_USER_DEFAULT, LOCALE_IDEFAULTCODEPAGE, ...).
- The default ANSI codepage of the current user or process,
GetLocaleInfo (LOCALE_USER_DEFAULT, LOCALE_IDEFAULTANSICODEPAGE, ...).
- The default OEM codepage used for system invariant operations,
GetLocaleInfo (LOCALE_INVARIANT, LOCALE_IDEFAULTCODEPAGE, ...).
- The default ANSI codepage used for system invariant operations,
GetLocaleInfo (LOCALE_INVARIANT, LOCALE_IDEFAULTANSICODEPAGE, ...).
Which is the right one?