From d8b8365eb2f40cf3bad1815c349faa6e0b5aab93 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 12 Jan 2016 06:33:43 -0800 Subject: Pretty-print DEL and U+DCxx str char using \xHEX. * lib.c (out_str_char): Don't print all characters above space as themselves. Treat 7F and U+DCxx as control chars to be printed using hex escape. --- lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib.c') diff --git a/lib.c b/lib.c index 245c0d3a..d6952482 100644 --- a/lib.c +++ b/lib.c @@ -8283,7 +8283,7 @@ static void out_str_char(wchar_t ch, val out, int *semi_flag) case '\\': put_string(lit("\\\\"), out); break; case 27: put_string(lit("\\e"), out); break; default: - if (ch >= ' ') { + if ((ch >= ' ' && ch != 127 && ch < 0xDC00) || ch > 0xDCFF) { put_char(chr(ch), out); } else { format(out, lit("\\x~,02X"), num(ch), nao); -- cgit v1.2.3