[pango/pango2-windows: 172/172] gtkjsonprinter.c: Don't check for <0x20 to output \uXXXX strings
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/pango2-windows: 172/172] gtkjsonprinter.c: Don't check for <0x20 to output \uXXXX strings
- Date: Tue, 21 Jun 2022 11:16:40 +0000 (UTC)
commit 2b5a4d125f95df09ab0fd53478f850a2e2b035c5
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Mon Jun 20 16:23:07 2022 +0800
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.
pango/json/gtkjsonprinter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/pango/json/gtkjsonprinter.c b/pango/json/gtkjsonprinter.c
index e9ca03a3..ec1b7e91 100644
--- a/pango/json/gtkjsonprinter.c
+++ b/pango/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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]