ref: 9219eca1a1e8055b768730590ab7e8d444c94c55
parent: 89793bba03c1a94b631a64d8d2bf761d43bf66c5
author: Tor Andersson <tor.andersson@artifex.com>
date: Thu Jun 23 09:54:20 EDT 2016
Fix JSON formatting of strings with unicode characters.
--- a/json.c
+++ b/json.c
@@ -129,7 +129,7 @@
case '\r': js_puts(J, sb, "\\r"); break;
case '\t': js_puts(J, sb, "\\t"); break;
default:
- if (c < ' ') {
+ if (c < ' ' || c > 127) {
js_puts(J, sb, "\\u");
js_putc(J, sb, HEX[(c>>12)&15]);
js_putc(J, sb, HEX[(c>>8)&15]);