path: root/textcode.h
diff options
authorFelix von Leitner <>2018-02-02 18:16:09 +0000
committerFelix von Leitner <>2018-02-02 18:16:09 +0000
commit39a431f4d87c564cd6c01ab493971d14f5ebb3fc (patch)
treec1f1a396e6ba344f8f759791d39e89dfacfb47e9 /textcode.h
parent707f0cca3b0906240758c42ba3f49bb1836d4989 (diff)
don't escape poop emoji (emit as utf8 instead)
if input is not valid utf8, encode each invalid byte as utf8 in output
Diffstat (limited to 'textcode.h')
1 files changed, 1 insertions, 1 deletions
diff --git a/textcode.h b/textcode.h
index 71829fe..b10cf3a 100644
--- a/textcode.h
+++ b/textcode.h
@@ -49,7 +49,7 @@ size_t fmt_foldwhitespace(char* dest,const char* src,size_t len);
size_t fmt_ldapescape(char* dest,const char* src,size_t len);
size_t fmt_ldapescape2(char* dest,const char* src,size_t len,const char* escapeme);
/* Encode JSON string from UTF-8; will backslash-escape the bare minimum.
- * Will not verify that the input is valid UTF-8!
+ * Invalid UTF-8 in input will output as valid UTF-8 for each byte
* Worst case: len*6 */
size_t fmt_jsonescape(char* dest,const char* src,size_t len);