How to print Chinese characters in console in window XP?

Elrood arno at nym.net
Sat Jun 27 12:49:47 PDT 2009


Sorry to have to disappoint you, but Chinese output to a Windows console
is non-trivial if not entirely impossible (you'd probably have to ask
someone using a Chinese Windows version for a definitive answer).

Your approach will work for more common unicode characters, like eg. the
greek alphabet, the problem is that the fonts included with your
standard Windows just don't come with Chinese glyphs.

In theory you *could* hack the registry to enable different fonts for
the console (HKLM/SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Console\TrueTypeFont, add a string entry named 00,
000, 000 etc. and your desired font as value), but you'd still have to
find a font including Chinese glyphs which works for this purpose. There
are fonts like for example GNU unifont and something called SimSun from
Micro$oft which contain these glyphs, but to my knowledge none these
work in the console.

So the short answer is no, afaik there isn't any practical way to get
Chinese output in the Windows console.


More information about the Digitalmars-d-learn mailing list