summaryrefslogtreecommitdiff
path: root/src/shared/utf8.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-03-31 08:57:28 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-04-05 00:42:01 -0400
commit0ade5ffe2778e7b238bba8d979ca4d53dee1e702 (patch)
tree462058f4b647ee6f31b4d9b19e6777ef85ff587e /src/shared/utf8.h
parenta36b8debe67f3a5515200dada75cf4dbc334c7f5 (diff)
journal: fix export of messages containing newlines
In "export" format, newlines are significant, and messages containing newlines must be exported as "binary".
Diffstat (limited to 'src/shared/utf8.h')
-rw-r--r--src/shared/utf8.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/shared/utf8.h b/src/shared/utf8.h
index c0eb73a21d..c087995930 100644
--- a/src/shared/utf8.h
+++ b/src/shared/utf8.h
@@ -31,7 +31,10 @@ const char *utf8_is_valid(const char *s) _pure_;
char *ascii_is_valid(const char *s) _pure_;
char *utf8_escape_invalid(const char *s);
-bool utf8_is_printable(const char* str, size_t length) _pure_;
+bool utf8_is_printable_newline(const char* str, size_t length, bool newline) _pure_;
+_pure_ static inline bool utf8_is_printable(const char* str, size_t length) {
+ return utf8_is_printable_newline(str, length, true);
+}
char *utf16_to_utf8(const void *s, size_t length);