diff nt/cmdproxy.c @ 78049:732fd38363dd

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