also escape negative chars (we are in utf-8 land now, no longer latin1)
This commit is contained in:
parent
0579cb6a7b
commit
ca968b8cec
@ -27,7 +27,7 @@ size_t fmt_cescape2(char* dest,const char* src,size_t len,const char* escapeme)
|
|||||||
written+=2;
|
written+=2;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (s[i]<' ' || escapeme[str_chr(escapeme,s[i])]==s[i]) {
|
if (s[i]<' ' || s[i]>=127 || escapeme[str_chr(escapeme,s[i])]==s[i]) {
|
||||||
if (dest) {
|
if (dest) {
|
||||||
dest[written]='\\';
|
dest[written]='\\';
|
||||||
dest[written+1]='x';
|
dest[written+1]='x';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user