diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-01-12 06:33:43 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-01-12 06:33:43 -0800 |
commit | d8b8365eb2f40cf3bad1815c349faa6e0b5aab93 (patch) | |
tree | db3781c5af62a80b1b16503719d80864b250ef62 /lib.c | |
parent | 5f9fd6726e36b4746acb5a098d5c1c2582c19d91 (diff) | |
download | txr-d8b8365eb2f40cf3bad1815c349faa6e0b5aab93.tar.gz txr-d8b8365eb2f40cf3bad1815c349faa6e0b5aab93.tar.bz2 txr-d8b8365eb2f40cf3bad1815c349faa6e0b5aab93.zip |
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.
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |