[xiph-commits] r15093 - trunk/vorbis-tools/share

ivo at svn.xiph.org ivo at svn.xiph.org
Mon Jun 30 06:00:33 PDT 2008


Author: ivo
Date: 2008-06-30 06:00:32 -0700 (Mon, 30 Jun 2008)
New Revision: 15093

Modified:
   trunk/vorbis-tools/share/utf8.c
Log:
Improve Unicode behavior in Windows.  Replaces GetConsoleCP() by CP_ACP as according to Peter Harris, "Current Visual Studio libraries assume CP_ACP for all output, regardless of the console code page."

Modified: trunk/vorbis-tools/share/utf8.c
===================================================================
--- trunk/vorbis-tools/share/utf8.c	2008-06-30 05:03:07 UTC (rev 15092)
+++ trunk/vorbis-tools/share/utf8.c	2008-06-30 13:00:32 UTC (rev 15093)
@@ -186,7 +186,7 @@
         return -1;
     }
 
-    chars = WideCharToMultiByte(GetConsoleCP(), WC_COMPOSITECHECK, unicode,
+    chars = WideCharToMultiByte(CP_ACP, WC_COMPOSITECHECK, unicode,
             -1, NULL, 0, NULL, NULL);
 
     if(chars == 0)
@@ -204,7 +204,7 @@
         return -1;
     }
 
-    err = WideCharToMultiByte(GetConsoleCP(), WC_COMPOSITECHECK, unicode, 
+    err = WideCharToMultiByte(CP_ACP, WC_COMPOSITECHECK, unicode, 
             -1, *to, chars, NULL, NULL);
     if(err != chars)
     {



More information about the commits mailing list