Bug 520914 - win_iconv doesn't support UCS-2
authorTor Lillqvist <tml@novell.com>
Wed, 12 Mar 2008 00:04:52 +0000 (00:04 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Wed, 12 Mar 2008 00:04:52 +0000 (00:04 +0000)
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.

svn path=/trunk/; revision=6686

ChangeLog
glib/win_iconv.c

index 61b0eca..a79283e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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.
+
 2008-03-11  Murray Cumming  <murrayc@murrayc.com>
 
        Bug 521591 – g_markup_parse_context_parse() creates GError message that 
index b6cbdc0..acc62d5 100644 (file)
@@ -178,10 +178,12 @@ static struct {
     {1200, "CP1200"},\r
     {1200, "UTF16LE"},\r
     {1200, "UTF-16LE"},\r
+    {1200, "UCS-2LE"},\r
 \r
     {1201, "CP1201"},\r
     {1201, "UTF16BE"},\r
     {1201, "UTF-16BE"},\r
+    {1201, "UCS-2BE"},\r
     {1201, "unicodeFFFE"},\r
 \r
     {12000, "CP12000"},\r
@@ -205,6 +207,7 @@ static struct {
     /* Default is little endian, because the platform is */\r
     {1200, "UTF16"},\r
     {1200, "UTF-16"},\r
+    {1200, "UCS-2"},\r
     {12000, "UTF32"},\r
     {12000, "UTF-32"},\r
 #endif\r
@@ -891,7 +894,9 @@ make_csconv(const char *_name)
     {\r
         cv.mbtowc = utf16_mbtowc;\r
         cv.wctomb = utf16_wctomb;\r
-        if (_stricmp(name, "UTF-16") == 0 || _stricmp(name, "UTF16") == 0)\r
+        if (_stricmp(name, "UTF-16") == 0 ||\r
+           _stricmp(name, "UTF16") == 0 ||\r
+           _stricmp(name, "UCS-2") == 0)\r
             cv.flags |= UNICODE_FLAG_USE_BOM_ENDIAN;\r
     }\r
     else if (cv.codepage == 12000 || cv.codepage == 12001)\r