Search code examples
encodinginternationalizationmbcswindows-1252

Is it possible to have a multi-byte character with the Windows-1252 code page?


i know some locale's (e.g. Far East locales) have multi-byte character sets, where it takes multiple bytes to represent a character.

i'd like to test my (ANSI) software's ability to cope with multi-byte characters.

Except that i live in north america, where my Windows code-page is set to Windows-1252.

Is it possible to construct a multi-byte character in my local Windows-1252 locale?


Solution

  • Is it possible to construct a multi-byte character in my local Windows-1252 locale?

    I don't believe it's possible with codepage 1252, but it IS possible to change the encoding Windows uses for non-Unicode text, and it's also possible to use something like the Applocale utility to do it on a per-process basis if you don't want to switch over the whole thing. (Though Applocale does have its failings.)

    Of course, you could always just send the multibyte characters as binary data to your software, which would be most useful if the locale used in the software itself (and thus what encoding is used to parse the data) is handled independently of the OS's.