On 23 November 2012 18:42, waterlan <waterlan@xs4all.nl> wrote:
Yongwei Wu schreef op 2012-11-23 11:18:

> On 23 November 2012 17:59, Erwin Waterlander <waterlan@xs4all.nl>
> wrote:
>> Hi Yongwei,
>> That's correct. When the system locale is Simplified Chinese, and
>> the
>> active code page is 1252 (Western European), I can also output
>> Chinese
>> characters in the console while the font is Lucida Console.
>> But when I change the system locale to English (United States) it
>> doesn't work any more. Then I get two squares for the Chinese
>> letters.
>> So Unicode in the console seems to work better with a Chinese system
>> locale.
> OK, Microsoft has a broken design. Maybe you should forget the
> consoles
> :-).

The "Uni" in Unicode is not so uni(versal) on Windows as on Linux. :(

The console is still used a lot on Windows, but not by the majority.
What was said in this thread about the standard console for cmd.exe also
counts for the PowerShell console, which is also used a lot.

I use the command line a lot on Linux and tend to do that also on

I did not mean not to use consoles. However, probably you do not want to write anything that depends on the console and also is able to handle non-default encodings well.

I have some old GNU tools like ls.exe, grep.exe, which used to work on Windows XP, but is now broken on Windows 7 to display Chinese correctly. It is different from your current issue, but also shows Microsoft made poor design choices/changes when dealing with non-ASCII characters.

Wu Yongwei
URL: http://wyw.dcweb.cn/