3

Well, Umm... I am a little furious with the codepages in Windows(R) console.

My aim is to change default CP into specific CP in the console without rebooting.

Sounds easy, right?

In Win7, the default CP can be changed into some CPs, but some cannot.

eg.

> chcp [ 437 | 850 | 852 | 855 | 857 | 860 | 861 | 863 | 865 | 866 | 869 | 65001 | ...  ]
> Active code page: nnn

but some can't, eg.

> chcp [ 932 | 936 | 949 | 950 ]
> Invalid code page

If I want to change default CP into CP (932, 936, 949, 950), I have to get into control panel, change the system locale, and reboot my computer.

Isn't it weird? I am curious about the reason.Thanks.

Kevin Dong
  • 645
  • 2
  • 10
  • 23
  • I'm pretty sure 932, 936, 949, and 950 IIRC were all implemented before Windows went to UTF-16, so it probably had to start the runtime up again and tell it not to look for UTF-16 – Bandrami Dec 24 '13 at 19:30
  • I remember when installing Win98 there was an option to install additional language support, however I never really know what it did. Now I believe it controlled what code pages are supported, and so had the ability to use any of them. I still need to confirm that, but more interested in changing to them without changing the system locale. – Adam L. S. Jan 28 '14 at 08:28

1 Answers1

3

In Windows 7 you could only set 932 code page when your windows system wide non-unicode locale set to Japanese (you don't need to install additional language support until you want messages in Japanese ;) ). Unfortunately you need to reboot windows after setting locale. I guess it is the case with other code pages you mentioned. After reboot your default locale will be 932 and you will have Japanese directories separator too:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:¥>chcp
Active code page: 932

C:¥>chcp 65001

Console window recreated after that command:

Active code page: 65001

C:\>
ISanych
  • 386
  • 2
  • 9