summaryrefslogtreecommitdiff
path: root/nt/cmdproxy.c
diff options
context:
space:
mode:
authorJason Rumney <jasonr@gnu.org>2007-06-25 12:30:40 +0000
committerJason Rumney <jasonr@gnu.org>2007-06-25 12:30:40 +0000
commit7387d2a0ebe045390a46a52a53c6a3051cf6c343 (patch)
treea0a7799f34e921d65abb625baa6a2d7787ea8079 /nt/cmdproxy.c
parent8d2ff2390a2ad6e5916944c6440f7b9ecffe4757 (diff)
downloademacs-7387d2a0ebe045390a46a52a53c6a3051cf6c343.tar.gz
(main): Set console codepages to "ANSI".
Diffstat (limited to 'nt/cmdproxy.c')
-rw-r--r--nt/cmdproxy.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/nt/cmdproxy.c b/nt/cmdproxy.c
index 4e4f1ef5c91..d01e7f39724 100644
--- a/nt/cmdproxy.c
+++ b/nt/cmdproxy.c
@@ -466,6 +466,12 @@ main (int argc, char ** argv)
SetCurrentDirectory (modname);
*progname = '\\';
+ /* Due to problems with interaction between API functions that use "OEM"
+ codepage vs API functions that use the "ANSI" codepage, we need to
+ make things consistent by choosing one and sticking with it. */
+ SetConsoleCP (GetACP());
+ SetConsoleOutputCP (GetACP());
+
/* Although Emacs always sets argv[0] to an absolute pathname, we
might get run in other ways as well, so convert argv[0] to an
absolute name before comparing to the module name. Don't get