How to print Chinese characters in console in window XP?

Rainer Deyke rainerd at eldwood.com
Sun Jun 28 19:09:23 PDT 2009


Elrood wrote:
> While it certainly wasn't my intent to spread false info, nor to defend
> D or sidetrack from its bugs, I cannot confirm that unicode output *just
> plain works*, neither with Python, and I'd be highly interested in more
> info on how you got it to work.

There are two separate issues here.  One is unicode output (which
involves translating unicode text to the encoding used by the console).
 The other issue is having a console window that can display the
characters that you want to display.

The former can be tested without resorting to exotic code pages.  Try to
 output 'Ķ' in CP775 or 'İ' in CP857.  Both of these code pages are
readily available.

To enable Chinese characters, some more work is necessary.  Under
Windows XP, Control Panel, Regional and Language Options:
  - On the Languages pane, make sure East Asian Languages is checked.
  - On the Advanced pane, select a language that uses Chinese characters.
  - On the Advanced pane, make sure that the code pages you want to use
are checked.


-- 
Rainer Deyke - rainerd at eldwood.com


More information about the Digitalmars-d-learn mailing list