Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to set permantly in DOS the codepage.

chcp 1252

How can I store the result of that command?

share|improve this question
    

2 Answers 2

Open the registry editor (regedit) and navigate to the following key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage

Edit the 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"
share|improve this answer
    
On my German win7 system the default code page was 850. –  Christian Dec 21 '12 at 14:43
    
@Christian, yes, it will vary depending on the Windows language used. However, with nothing more to go on than the OP’s name, I suspect they are most likely using code-page 861 by default. –  Synetech Dec 21 '12 at 16:40

change the value of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage make my system unable to boot.

Add a string value in HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor

of

"Autorun"="chcp 1252"

solves the problem.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.