From fb72653abc08f97c0e8838dce0f9cde1bc54188b Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Wed, 12 Mar 2008 00:04:52 +0000 Subject: [PATCH] Bug 520914 - win_iconv doesn't support UCS-2 2008-03-12 Tor Lillqvist 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 | 8 ++++++++ glib/win_iconv.c | 7 ++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 61b0eca..a79283e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-03-12 Tor Lillqvist + + 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 Bug 521591 – g_markup_parse_context_parse() creates GError message that diff --git a/glib/win_iconv.c b/glib/win_iconv.c index b6cbdc0..acc62d5 100644 --- a/glib/win_iconv.c +++ b/glib/win_iconv.c @@ -178,10 +178,12 @@ static struct { {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 @@ static struct { /* 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 @@ make_csconv(const char *_name) { 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) -- 2.7.4