summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2022-06-20 16:23:07 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2022-08-01 18:23:33 +0800
commite27dc7a006ba68976c322c2189116f95ce6636d2 (patch)
treeae9f1472382ff817ca1609093494ff9a91520e8f
parentc81cca293df9b2e9d2844612521ec64e376339e8 (diff)
downloadpango-e27dc7a006ba68976c322c2189116f95ce6636d2.tar.gz
gtkjsonprinter.c: Don't check for <0x20 to output \uXXXX strings
Apparently the check for character values less than 0x20 to determine whether to output \uXXXX in leau of the actual UTF-8 strings break the layout test on Windows. Just print the UTF-8 string as-is unless specifically set to output only ascii lines.
-rw-r--r--pango2/json/gtkjsonprinter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pango2/json/gtkjsonprinter.c b/pango2/json/gtkjsonprinter.c
index e9ca03a3..ec1b7e91 100644
--- a/pango2/json/gtkjsonprinter.c
+++ b/pango2/json/gtkjsonprinter.c
@@ -228,7 +228,7 @@ gtk_json_printer_escape_string (GtkJsonPrinter *self,
default:
if ((int) *str < 0x20 || (int) *str >= 0x80)
{
- if ((guint) *str < 0x20 || gtk_json_printer_has_flag (self, GTK_JSON_PRINTER_ASCII))
+ if (gtk_json_printer_has_flag (self, GTK_JSON_PRINTER_ASCII))
g_string_append_printf (string, "\\u%04x", g_utf8_get_char (str));
else
g_string_append_unichar (string, g_utf8_get_char (str));