Ascii character code 127 (DEL) is not printable and must be quoted. (#5984)

This is a follow-up to #5823.
This commit is contained in:
Markus F.X.J. Oberhumer 2017-06-15 20:42:23 +02:00 • committed by Andreas Rumpf
commit a0f39e0ab4
6 changed files with 9 additions and 9 deletions

View file

@ -1001,7 +1001,7 @@ proc escapeJson*(s: string; result: var string) =
result.add("\"")
for x in runes(s):
var r = int(x)
if r >= 32 and r <= 127:
if r >= 32 and r <= 126:
var c = chr(r)
case c
of '"': result.add("\\\"")