glib r6686 - in trunk: . glib



Author: tml
Date: Wed Mar 12 00:04:52 2008
New Revision: 6686
URL: http://svn.gnome.org/viewvc/glib?rev=6686&view=rev

Log:
2008-03-12  Tor Lillqvist  <tml novell com>

	Bug 520914 - win_iconv doesn't support UCS-2
	
	* glib/win_iconv.c: Make UCS-2 just an alias for
	UTF-16. Technically this is wrong of course, but shouldn't matter
	an awful lot in practice.



Modified:
   trunk/ChangeLog
   trunk/glib/win_iconv.c

Modified: trunk/glib/win_iconv.c
==============================================================================
--- trunk/glib/win_iconv.c	(original)
+++ trunk/glib/win_iconv.c	Wed Mar 12 00:04:52 2008
@@ -178,10 +178,12 @@
     {1200, "CP1200"},
     {1200, "UTF16LE"},
     {1200, "UTF-16LE"},
+    {1200, "UCS-2LE"},
 
     {1201, "CP1201"},
     {1201, "UTF16BE"},
     {1201, "UTF-16BE"},
+    {1201, "UCS-2BE"},
     {1201, "unicodeFFFE"},
 
     {12000, "CP12000"},
@@ -205,6 +207,7 @@
     /* Default is little endian, because the platform is */
     {1200, "UTF16"},
     {1200, "UTF-16"},
+    {1200, "UCS-2"},
     {12000, "UTF32"},
     {12000, "UTF-32"},
 #endif
@@ -891,7 +894,9 @@
     {
         cv.mbtowc = utf16_mbtowc;
         cv.wctomb = utf16_wctomb;
-        if (_stricmp(name, "UTF-16") == 0 || _stricmp(name, "UTF16") == 0)
+        if (_stricmp(name, "UTF-16") == 0 ||
+	    _stricmp(name, "UTF16") == 0 ||
+	    _stricmp(name, "UCS-2") == 0)
             cv.flags |= UNICODE_FLAG_USE_BOM_ENDIAN;
     }
     else if (cv.codepage == 12000 || cv.codepage == 12001)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]