]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Add comment.
authorBruno Haible <bruno@clisp.org>
Sat, 12 Dec 2009 13:49:18 +0000 (14:49 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 12 Dec 2009 15:13:51 +0000 (16:13 +0100)
gettext-runtime/intl/ChangeLog
gettext-runtime/intl/localcharset.c

index e7448acb74d58462a50555e96179e76c59026e9c..4372b160de3a200c09538ce2861a9d6751c3c94c 100644 (file)
@@ -1,3 +1,7 @@
+2009-12-12  Bruno Haible  <bruno@clisp.org>
+
+       * localcharset.c (locale_charset): Add comment about use of GetACP.
+
 2009-12-12  Bruno Haible  <bruno@clisp.org>
 
        * intl-compat.c: Untabify.
index 5f13f84e0871e50df88481e70b6584696e0f1f0e..8506eed548f0609dec0ff41a7ed2f1ab50eb7242 100644 (file)
@@ -450,7 +450,19 @@ locale_charset (void)
 
   static char buf[2 + 10 + 1];
 
-  /* Woe32 has a function returning the locale's codepage as a number.  */
+  /* Woe32 has a function returning the locale's codepage as a number.
+     When the output goes to a console window, in Windows 95, it would have
+     been appropriate to use GetOEMCP() instead of GetACP().  But this has
+     been corrected: In Windows XP SP3, consoles accept output in the
+     GetACP() encoding.  The GetConsoleOutputCP() function still returns
+     the same as GetOEMCP() (not GetACP()!), but the font handling in the
+     console actually uses the GetACP() encoding.  If you want to "correct"
+     this by calling SetConsoleOutputCP(GetACP()), then for a TrueType font
+     it has no visible effect on the displayed glyphs, whereas when a raster
+     font is in use, the console performs an extra conversion from GetOEMCP()
+     to GetACP() encoding, thus changing the effective codepage of the
+     console from GetACP() to GetOEMCP()!  In summary, GetConsoleOutputCP()
+     and SetConsoleOutputCP() are now completely broken.  */
   sprintf (buf, "CP%u", GetACP ());
   codeset = buf;