escape all non-ascii chars to avoid problems with UTF terminals

This commit is contained in:
2017-11-03 13:41:38 +01:00
parent 489e783872
commit abd8daafc3

View File

@ -296,7 +296,7 @@ StreamBuffer StreamBuffer::expand(ssize_t start, ssize_t length) const
for (i = start; i < end; i++) for (i = start; i < end; i++)
{ {
c = buffer[i]; c = buffer[i];
if ((c & 0x7f) < 0x20 || (c & 0x7f) == 0x7f) if (c < 0x20 || c >= 0x7f)
{ {
result.print("<%02x>", c & 0xff); result.print("<%02x>", c & 0xff);
} }