From 5c903d283ba0919eeffc0b37b97ac513a96e5e8e Mon Sep 17 00:00:00 2001 From: Abigail Brady Date: Wed, 25 Jun 2003 18:03:38 +0000 Subject: [PATCH] Use C99 style \uxxxx and \Uxxxxyyyy escapes instead for fallback instead 2003-06-25 Abigail Brady * glib/gconvert.c (g_convert_with_fallback): Use C99 style \uxxxx and \Uxxxxyyyy escapes instead for fallback instead of perl-style \X{xxxx} ones, fixing bug #114284. --- ChangeLog | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-12 | 6 ++++++ ChangeLog.pre-2-4 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ glib/gconvert.c | 5 ++--- 7 files changed, 38 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 893d9ac..c515b6d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-06-25 Abigail Brady + + * glib/gconvert.c (g_convert_with_fallback): Use C99 style \uxxxx + and \Uxxxxyyyy escapes instead for fallback instead of perl-style + \X{xxxx} ones, fixing bug #114284. + 2003-06-25 Tor Lillqvist * glib/giowin32.c (g_io_channel_unix_new): Pass real &optval and diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 893d9ac..c515b6d 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2003-06-25 Abigail Brady + + * glib/gconvert.c (g_convert_with_fallback): Use C99 style \uxxxx + and \Uxxxxyyyy escapes instead for fallback instead of perl-style + \X{xxxx} ones, fixing bug #114284. + 2003-06-25 Tor Lillqvist * glib/giowin32.c (g_io_channel_unix_new): Pass real &optval and diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 893d9ac..c515b6d 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,9 @@ +2003-06-25 Abigail Brady + + * glib/gconvert.c (g_convert_with_fallback): Use C99 style \uxxxx + and \Uxxxxyyyy escapes instead for fallback instead of perl-style + \X{xxxx} ones, fixing bug #114284. + 2003-06-25 Tor Lillqvist * glib/giowin32.c (g_io_channel_unix_new): Pass real &optval and diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 893d9ac..c515b6d 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +2003-06-25 Abigail Brady + + * glib/gconvert.c (g_convert_with_fallback): Use C99 style \uxxxx + and \Uxxxxyyyy escapes instead for fallback instead of perl-style + \X{xxxx} ones, fixing bug #114284. + 2003-06-25 Tor Lillqvist * glib/giowin32.c (g_io_channel_unix_new): Pass real &optval and diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 893d9ac..c515b6d 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +2003-06-25 Abigail Brady + + * glib/gconvert.c (g_convert_with_fallback): Use C99 style \uxxxx + and \Uxxxxyyyy escapes instead for fallback instead of perl-style + \X{xxxx} ones, fixing bug #114284. + 2003-06-25 Tor Lillqvist * glib/giowin32.c (g_io_channel_unix_new): Pass real &optval and diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 893d9ac..c515b6d 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2003-06-25 Abigail Brady + + * glib/gconvert.c (g_convert_with_fallback): Use C99 style \uxxxx + and \Uxxxxyyyy escapes instead for fallback instead of perl-style + \X{xxxx} ones, fixing bug #114284. + 2003-06-25 Tor Lillqvist * glib/giowin32.c (g_io_channel_unix_new): Pass real &optval and diff --git a/glib/gconvert.c b/glib/gconvert.c index bd2f67d..58cfc72 100644 --- a/glib/gconvert.c +++ b/glib/gconvert.c @@ -652,7 +652,7 @@ g_convert_with_iconv (const gchar *str, * present in the target encoding. (This must be * in the target encoding), if %NULL, characters * not in the target encoding will be represented - * as Unicode escapes \x{XXXX} or \x{XXXXXX}. + * as Unicode escapes \uxxxx or \Uxxxxyyyy. * @bytes_read: location to store the number of bytes in the * input string that were successfully converted, or %NULL. * Even if the conversion was successful, this may be @@ -807,8 +807,7 @@ g_convert_with_fallback (const gchar *str, if (!fallback) { gunichar ch = g_utf8_get_char (p); - insert_str = g_strdup_printf ("\\x{%0*X}", - (ch < 0x10000) ? 4 : 6, + insert_str = g_strdup_printf (ch < 0x10000 ? "\\u%04x" : "\\U%08x", ch); } else -- 2.7.4