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

@ -371,7 +371,7 @@ proc esc(c: char, reserved = {'\0'..'\255'}): string =
of '\a': result = "\\a"
of '\\': result = "\\\\"
of 'a'..'z', 'A'..'Z', '0'..'9', '_': result = $c
elif c < ' ' or c >= '\128': result = '\\' & $ord(c)
elif c < ' ' or c >= '\127': result = '\\' & $ord(c)
elif c in reserved: result = '\\' & c
else: result = $c