Use C99 style \uxxxx and \Uxxxxyyyy escapes instead for fallback instead
authorAbigail Brady <morwen@evilmagic.org>
Wed, 25 Jun 2003 18:03:38 +0000 (18:03 +0000)
committerAbigail Brady <abrady@src.gnome.org>
Wed, 25 Jun 2003 18:03:38 +0000 (18:03 +0000)
2003-06-25  Abigail Brady  <morwen@evilmagic.org>

  * 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
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib/gconvert.c

index 893d9ac..c515b6d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-06-25  Abigail Brady  <morwen@evilmagic.org>
+       * 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  <tml@iki.fi>
 
        * glib/giowin32.c (g_io_channel_unix_new): Pass real &optval and
index 893d9ac..c515b6d 100644 (file)
@@ -1,3 +1,9 @@
+2003-06-25  Abigail Brady  <morwen@evilmagic.org>
+       * 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  <tml@iki.fi>
 
        * glib/giowin32.c (g_io_channel_unix_new): Pass real &optval and
index 893d9ac..c515b6d 100644 (file)
@@ -1,3 +1,9 @@
+2003-06-25  Abigail Brady  <morwen@evilmagic.org>
+       * 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  <tml@iki.fi>
 
        * glib/giowin32.c (g_io_channel_unix_new): Pass real &optval and
index 893d9ac..c515b6d 100644 (file)
@@ -1,3 +1,9 @@
+2003-06-25  Abigail Brady  <morwen@evilmagic.org>
+       * 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  <tml@iki.fi>
 
        * glib/giowin32.c (g_io_channel_unix_new): Pass real &optval and
index 893d9ac..c515b6d 100644 (file)
@@ -1,3 +1,9 @@
+2003-06-25  Abigail Brady  <morwen@evilmagic.org>
+       * 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  <tml@iki.fi>
 
        * glib/giowin32.c (g_io_channel_unix_new): Pass real &optval and
index 893d9ac..c515b6d 100644 (file)
@@ -1,3 +1,9 @@
+2003-06-25  Abigail Brady  <morwen@evilmagic.org>
+       * 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  <tml@iki.fi>
 
        * glib/giowin32.c (g_io_channel_unix_new): Pass real &optval and
index bd2f67d..58cfc72 100644 (file)
@@ -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