glib r6817 - in branches/glib-2-16: . glib



Author: tml
Date: Thu Apr  3 16:01:35 2008
New Revision: 6817
URL: http://svn.gnome.org/viewvc/glib?rev=6817&view=rev

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

	Bug 525972 - UCS-4 not in the new win_iconv implementation

	* glib/win_iconv.c: Add UCS-4. Also add spelling of UCS-2 without
	the hyphen.



Modified:
   branches/glib-2-16/ChangeLog
   branches/glib-2-16/glib/win_iconv.c

Modified: branches/glib-2-16/glib/win_iconv.c
==============================================================================
--- branches/glib-2-16/glib/win_iconv.c	(original)
+++ branches/glib-2-16/glib/win_iconv.c	Thu Apr  3 16:01:35 2008
@@ -188,21 +188,27 @@
     {1200, "CP1200"},
     {1200, "UTF16LE"},
     {1200, "UTF-16LE"},
+    {1200, "UCS2LE"},
     {1200, "UCS-2LE"},
 
     {1201, "CP1201"},
     {1201, "UTF16BE"},
     {1201, "UTF-16BE"},
+    {1201, "UCS2BE"},
     {1201, "UCS-2BE"},
     {1201, "unicodeFFFE"},
 
     {12000, "CP12000"},
     {12000, "UTF32LE"},
     {12000, "UTF-32LE"},
+    {12000, "UCS4LE"},
+    {12000, "UCS-4LE"},
 
     {12001, "CP12001"},
     {12001, "UTF32BE"},
     {12001, "UTF-32BE"},
+    {12001, "UCS4BE"},
+    {12001, "UCS-4BE"},
 
 #ifndef GLIB_COMPILATION
     /*
@@ -213,13 +219,18 @@
     {1201, "UTF-16"},
     {12001, "UTF32"},
     {12001, "UTF-32"},
+    {12001, "UCS-4"},
+    {12001, "UCS4"},
 #else
     /* Default is little endian, because the platform is */
     {1200, "UTF16"},
     {1200, "UTF-16"},
+    {1200, "UCS2"},
     {1200, "UCS-2"},
     {12000, "UTF32"},
     {12000, "UTF-32"},
+    {12000, "UCS4"},
+    {12000, "UCS-4"},
 #endif
 
     /* copy from libiconv `iconv -l` */
@@ -911,14 +922,18 @@
         cv.wctomb = utf16_wctomb;
         if (_stricmp(name, "UTF-16") == 0 ||
 	    _stricmp(name, "UTF16") == 0 ||
-	    _stricmp(name, "UCS-2") == 0)
+	    _stricmp(name, "UCS-2") == 0 ||
+	    _stricmp(name, "UCS2") == 0)
             cv.flags |= FLAG_USE_BOM_ENDIAN;
     }
     else if (cv.codepage == 12000 || cv.codepage == 12001)
     {
         cv.mbtowc = utf32_mbtowc;
         cv.wctomb = utf32_wctomb;
-        if (_stricmp(name, "UTF-32") == 0 || _stricmp(name, "UTF32") == 0)
+        if (_stricmp(name, "UTF-32") == 0 ||
+	    _stricmp(name, "UTF32") == 0 ||
+	    _stricmp(name, "UCS-4") == 0 ||
+	    _stricmp(name, "UCS4") == 0)
             cv.flags |= FLAG_USE_BOM_ENDIAN;
     }
     else if (cv.codepage == 65001)



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