From: Matthias Clasen Date: Mon, 20 Sep 2004 04:38:38 +0000 (+0000) Subject: Add a note explaining how to convert UTF-16 byte stream of ambiguous X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=a4026b4cbff5d59b94a7e4ffabe764f6211839f6;p=dana%2Fcg-glib.git Add a note explaining how to convert UTF-16 byte stream of ambiguous Mon Sep 20 00:35:14 2004 Matthias Clasen * glib/gutf8.c (g_utf16_to_utf8): Add a note explaining how to convert UTF-16 byte stream of ambiguous endianness. (#152954, Linus Walleij) --- diff --git a/ChangeLog b/ChangeLog index 6f315a6e..cad31b47 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Mon Sep 20 00:35:14 2004 Matthias Clasen + + * glib/gutf8.c (g_utf16_to_utf8): Add a note explaining how to + convert UTF-16 byte stream of ambiguous endianness. (#152954, + Linus Walleij) + Mon Sep 20 00:17:37 2004 Matthias Clasen * tests/option-test.c (error_test3_post_parse): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 6f315a6e..cad31b47 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +Mon Sep 20 00:35:14 2004 Matthias Clasen + + * glib/gutf8.c (g_utf16_to_utf8): Add a note explaining how to + convert UTF-16 byte stream of ambiguous endianness. (#152954, + Linus Walleij) + Mon Sep 20 00:17:37 2004 Matthias Clasen * tests/option-test.c (error_test3_post_parse): diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 6f315a6e..cad31b47 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,9 @@ +Mon Sep 20 00:35:14 2004 Matthias Clasen + + * glib/gutf8.c (g_utf16_to_utf8): Add a note explaining how to + convert UTF-16 byte stream of ambiguous endianness. (#152954, + Linus Walleij) + Mon Sep 20 00:17:37 2004 Matthias Clasen * tests/option-test.c (error_test3_post_parse): diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 6f315a6e..cad31b47 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +Mon Sep 20 00:35:14 2004 Matthias Clasen + + * glib/gutf8.c (g_utf16_to_utf8): Add a note explaining how to + convert UTF-16 byte stream of ambiguous endianness. (#152954, + Linus Walleij) + Mon Sep 20 00:17:37 2004 Matthias Clasen * tests/option-test.c (error_test3_post_parse): diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 6f315a6e..cad31b47 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +Mon Sep 20 00:35:14 2004 Matthias Clasen + + * glib/gutf8.c (g_utf16_to_utf8): Add a note explaining how to + convert UTF-16 byte stream of ambiguous endianness. (#152954, + Linus Walleij) + Mon Sep 20 00:17:37 2004 Matthias Clasen * tests/option-test.c (error_test3_post_parse): diff --git a/glib/gutf8.c b/glib/gutf8.c index b958a45f..ed830b18 100644 --- a/glib/gutf8.c +++ b/glib/gutf8.c @@ -1030,6 +1030,11 @@ g_ucs4_to_utf8 (const gunichar *str, * * Convert a string from UTF-16 to UTF-8. The result will be * terminated with a 0 byte. + * + * Note that the input is expected to be already in native endianness, + * an initial byte-order-mark character is not handled specially. + * g_convert() can be used to convert a byte buffer of UTF-16 data of + * ambiguous endianess. * * Return value: a pointer to a newly allocated UTF-8 string. * This value must be freed with g_free(). If an