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
Patch from Steve Hay:
However, they actually return information about the operating system
defaults, so GetOEMCP() doesn't get the correct value of a Command
Prompt's code page if you've changed it from its initial default value
using (e.g.) "mode con cp select=...". The patch therefore adds
GetConsoleCP() and GetConsoleOutputCP() as well. The latter is what
you need to correctly get the current console's output code page.
The patch also adds SetConsoleCP() and SetConsoleOutputCP(), since
they can be very useful too. For example, in the core perl
t/op/magic.t script, which started all this for me, it is now possible
to set the console's output code page to match perl's code page (the
Windows ANSI code page) and thus avoid the need to convert the
encoding of data read from the console (which was originally going to
be my approach).
0 commit comments