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:
parent
6ca9ad6608
commit
a0f39e0ab4
6 changed files with 9 additions and 9 deletions
|
|
@ -543,7 +543,7 @@ var
|
|||
|
||||
proc toCChar*(c: char): string =
|
||||
case c
|
||||
of '\0'..'\x1F', '\x80'..'\xFF': result = '\\' & toOctal(c)
|
||||
of '\0'..'\x1F', '\x7F'..'\xFF': result = '\\' & toOctal(c)
|
||||
of '\'', '\"', '\\', '?': result = '\\' & c
|
||||
else: result = $(c)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue