summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2022-01-05 01:37:34 +0000
committerMatthias Clasen <mclasen@redhat.com>2022-01-05 01:37:34 +0000
commit0f8931004fed4829b7a1c4b34c09c76b84b362d8 (patch)
tree05993b71839a83fb8700e318a5af5fb7ebc98165 /pango
parent05699b666d1138bd8268fd708e3047b4c4a26b65 (diff)
parent18235a64c08b6dac3be5d368f3baaee285cabc3d (diff)
downloadpango-0f8931004fed4829b7a1c4b34c09c76b84b362d8.tar.gz
Merge branch 'wip/smcv/json-unsigned-char' into 'main'
serializer: Serialize non-ASCII correctly if char is unsigned Closes #652 See merge request GNOME/pango!572
Diffstat (limited to 'pango')
-rw-r--r--pango/json/gtkjsonprinter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pango/json/gtkjsonprinter.c b/pango/json/gtkjsonprinter.c
index f2f1e273..e9ca03a3 100644
--- a/pango/json/gtkjsonprinter.c
+++ b/pango/json/gtkjsonprinter.c
@@ -226,7 +226,7 @@ gtk_json_printer_escape_string (GtkJsonPrinter *self,
g_string_append (string, "\\t");
break;
default:
- if ((int) *str < 0x20)
+ if ((int) *str < 0x20 || (int) *str >= 0x80)
{
if ((guint) *str < 0x20 || gtk_json_printer_has_flag (self, GTK_JSON_PRINTER_ASCII))
g_string_append_printf (string, "\\u%04x", g_utf8_get_char (str));