I would like to set permantly in DOS the codepage.
How can I store the result of that command?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
Open the registry editor (
regedit) and navigate to the following key:
OEMCP value on the right and change it from the default (861?) to 1252.
Now open a new command-prompt and type
chcp to see the current codepage. (It may—probably?—will not take until you reboot.)
Another way you can do it is to add the
chcp command to the
Autorun key (you can set it for either a specific user or the whole system):
REGEDIT4 ; Auto–code-page.reg ; Have chcp automatically run whenever a command-prompt is opened ; ;For current user [HKEY_CURRENT_USER\Software\Microsoft\Command Processor] "Autorun"="chcp 1252" ;For all users ;[HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor] ;"Autorun"="chcp 1252"
Open Control Panel. Choose Clock, Language and Region:
Then Change keyboard or other input methods:
Switch to the Administrative tab:
Click Change system locale under Language for non-Unicode programs and choose the desired language.
But yes, it changes:
and maybe other things.
Speaking of which, that's probably why changing
65001 made the system unbootable. There's no such option in Control Panel.
(Screenshots taken from here as I don't have Windows with an English language pack at hand to make screenshots.)
I'm a user of Russian-localized Windows 7 x64 and so I need to set Code Page 1251 (Windows Cyrillic) as the default for CMD. The solution by Synetech as well as the solution by Steven Penny do work but with the latter only CMD will be affected and so for example the
ping utility will work incorrectly, so I decided to apply them both. At the same time changing default Code Page isn't sufficient: the default font of the CMD window does not support this encoding and I'm forced to set the
Lucida Console font as the default. The following .REG file does the whole work (changing the default codepage to 1251 and also setting
Lucida Console as the default font for CMD with proper properties):
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage] "OEMCP"="1251" [-HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe] [HKEY_CURRENT_USER\Console] ; Code Page 1251 "CodePage"=dword:000004e3 ; Default font for CMD window is "Lucida Console" "FaceName"="Lucida Console" "FontFamily"=dword:00000036 "FontSize"=dword:00140000 "FontWeight"=dword:00000190 "ScreenBufferSize"=dword:012C0064 "WindowSize"=dword:00190064
After importing this .REG file into the registry (by double-clicking on the file and choosing "Yes") you must reboot the system for the changes to take effect.