Sorting it all Out Michael Kaplan's random stuff of dubious value Be sure to read the disclaimer here first!
The chcp.com utility is a simple little program sitting in the \WINDOWS\SYSTEM32 subdirectory. Running it with /? willl give some helpful information about its purpose:
C:\WINDOWS\system32>chcp /?Displays or sets the active code page number. CHCP [nnn] nnn Specifies a code page number. Type CHCP without a parameter to display the active code page number.
C:\WINDOWS\system32>chcp /?Displays or sets the active code page number.
CHCP [nnn]
nnn Specifies a code page number.
Type CHCP without a parameter to display the active code page number.
There is also more information in the Windows XP documentation, which does hint at a problem in its small list of "supported" code pages:
Code page Country/region or language 437 United States 850 Multilingual (Latin I) 852 Slavic (Latin II) 855 Cyrillic (Russian) 857 Turkish 860 Portuguese 861 Icelandic 863 Canadian-French 865 Nordic 866 Russian 869 Modern Greek
437
United States
850
Multilingual (Latin I)
852
Slavic (Latin II)
855
Cyrillic (Russian)
857
Turkish
860
Portuguese
861
Icelandic
863
Canadian-French
865
Nordic
866
Russian
869
Modern Greek
None of the ACP values are there, though this is I think a bit of social engineering -- to keep people thinking of it as the OEM code page. The 125x series code pages also work well here.
However, another set that is missing from the list is the ideographic code pages. You cannot use chcp to change to one of the ideographic code pages unless it is also the default system OEM code page.
Thus on a system with an 0x0409 default system code page:
C:\WINDOWS\system32>chcp 932Invalid code page C:\WINDOWS\system32>chcp 936Invalid code page C:\WINDOWS\system32>chcp 949Invalid code page C:\WINDOWS\system32>chcp 950Invalid code page
C:\WINDOWS\system32>chcp 932Invalid code page
C:\WINDOWS\system32>chcp 936Invalid code page
C:\WINDOWS\system32>chcp 949Invalid code page
C:\WINDOWS\system32>chcp 950Invalid code page
This is a known and expected limitation for which there is no workaround....
This post brought to you by "Ā" (U+0100, a.k.a. LATIN CAPITAL LETTER A WITH MACRON)
I got here via a mutual friend (Google). I want to use the 1252 code page. Chcp 1252 seems to respond well (it says 1252 is now active) but then when I type a file that contains upper ascii in it, it still display it as one would expect under page 437. I try writing to the screen from a program, I try to type characters directly holding down ALT and typing the decimal value - it still show me the page 437 characters, not the 1252 characters. As far as I can tell, all CHCP does under XP is tell you that your page is active, otherwise nothing. :( I would greatly appreciate any pointers. Thank.
Change out of the raster font, perhaps? Move to Lucida Console....
interesting reading here, thank you.
I've had an occurrance of the path variable on xp pro being displayed correctly once only as human readable then as ascii chars only.
turned out the codepage for this machine was set to 850, if I then manually set the codepage to 437, the path variable remains human readable [that is; from a command prompt screen output].
the mystery is ; the machine is set to australian english in regional settings; there's no multi linguallity [is that a word?] other than that.
what else could possibly cause the path variable [and it's the only environment variable to be affected] to display ascii chars?
I'm also making the assumption that the ascii chars may cause some apps. to not read the path var. properly, right?
This blog dedicated to six weeks I almost got to spend in Australia nearly 15 years ago, and a Kinks
>If you need unicode output in file, you must use command CMD with option /U.
I've tried
CMD /U Tree /a > temp.txt
in line 1 of batch file, which stop in this command and nothing is actually executed.
temp.txt is not generated and the script does not continue.
Using a Japanese Windows XP, eastern language enabled of course
And for CHCP, the dos batch script will just close after running CHCP, anything below CHCP will not be executed as well.
Is there a replacement for chcp on a 64bit client, I was browsing through the system32 and found chcp,
but looking through sysWoW64, I saw nothing that resembles a chcp setting.