How to print Chinese characters in console in window XP?

Rainer Deyke rainerd at eldwood.com
Sat Jun 27 16:38:39 PDT 2009


Derek Parnell wrote:
> C:\temp>chcp 932
> Invalid code page
> C:\temp>chcp 65001
> Active code page: 65001
> 
> It seems that my Windows XP doesn't know about CP932.

Yeah, it looks like some more setup work is required.  I got the same
error message when trying to use CP932 or CP950.  Under Windows XP, in
Regional and Language Options under the control panel:
  - On the Languages pane, make sure East Asian languages checked.
  - On the Advanced pane, make sure that the code pages you want to use
are checked.
  - Also on the Advanced pane, you may need to select the language you
want to use as the language for non-Unicode programs.

However, I assume that the OP already has his computer set up to support
Chinese characters from the console, or he wouldn't be asking this
question.  I can confirm that on my computer, unicode text output works
in Python but not in D.


-- 
Rainer Deyke - rainerd at eldwood.com


More information about the Digitalmars-d-learn mailing list