You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
Windows XP, Russian locale: a codepage change in a child process affects the current console as well #2196
See the following screenshot, which is more or less self-explanatory:
You may see here that «chcp 65001» in a child process affects the console window of the parent (until «chcp 866» command is issued in the console, which switches the codepage back to the default CP866).
Note 1
You need your Windows console to use raster fonts (not the vector Lucida Console) to experience the problem.
The choice of fonts is controlled by the corresponding setting in the center of the second tab of the familiar console properties dialog.
In Russian locale of Windows XP, that dialog looks like the following:
Note 2
In order to demonstrate the problem, the test string should contain characters within the default codepage (so that they are initially printable in the console), but outside the 7-bit ASCII range (because the 7-bit ASCII characters are not affected).
For example, for Russian locale, the string '\u0422\u0435\u0441\u0442' contains Unicode positions for characters («Тест») that exist in the second (0x80—0xff) half of CP866 (which is the default codepage for Windows consoles of Russian locale).
Origin
This problem was discovered in my search of a workaround for #2190.
It is possible, but I don't like console windows to pop up whenever a child process is started. It would be better if we didn't require users to call chcp in te first place.
Activity
piscisaureus commentedon Nov 27, 2011
This is not something we can solve - the code page is a per-console setting on windows.
Mithgol commentedon Nov 28, 2011
Can the child process be run in its own console? (Does it always reuse the console of the parent?)
piscisaureus commentedon Nov 28, 2011
It is possible, but I don't like console windows to pop up whenever a child process is started. It would be better if we didn't require users to call chcp in te first place.
piscisaureus commentedon Nov 28, 2011
CREATE_NO_WINDOW seems to work. However this will break stdio inheritance when people use the
customFds: [0, 1, 2]option.Mithgol commentedon Jul 24, 2012
Then, I guess, nothing can be done about it.
I am now closing the issue.