isprint()

This commit is contained in:
Michael Davidsaver
2020-03-31 20:06:00 -07:00
parent aa751ae9d2
commit 9c9596b4d3
+1 -1
View File
@@ -155,7 +155,7 @@ std::ostream& operator<<(std::ostream& strm, const Escaper& esc)
case '\'': next = '\''; break;
case '\"': next = '\"'; break;
default:
if(isprint(c)) {
if(c>=' ' && c<='~') { // isprint()
strm.put(c);
} else {
strm<<"\\x"<<std::hex<<std::setw(2)<<std::setfill('0')<<unsigned(c&0xff);