diff nt/cmdproxy.c @ 81605:69c77f0f3507

(main): Set console codepages to "ANSI".
author Jason Rumney <jasonr@gnu.org>
date Mon, 25 Jun 2007 12:35:05 +0000
parents 4ad431d8e164
children 075eb71f218d 988f1edc9674
line wrap: on
line diff
--- a/nt/cmdproxy.c	Mon Jun 25 05:09:05 2007 +0000
+++ b/nt/cmdproxy.c	Mon Jun 25 12:35:05 2007 +0000
@@ -466,6 +466,12 @@
   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