Browse Source

also escape negative chars (we are in utf-8 land now, no longer latin1)

master
Felix von Leitner 2 months ago
parent
commit
28d01b3688
  1. 2
      textcode/fmt_cescape.c

2
textcode/fmt_cescape.c

@ -27,7 +27,7 @@ size_t fmt_cescape2(char* dest,const char* src,size_t len,const char* escapeme)
written+=2;
break;
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) {
dest[written]='\\';
dest[written+1]='x';

Loading…
Cancel
Save