chiark / gitweb /
utf8: minor simplifications
[elogind.git] / src / shared / utf8.h
index c0eb73a21d32ea5a483fea51fa39ff6de96ddc4d..59abee50ac08bc2ad26aed8fd90bea76869a606e 100644 (file)
 
 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_;
+#define utf8_is_printable(str, length) utf8_is_printable_newline(str, length, true)
+
+char *utf8_escape_invalid(const char *s);
+char *utf8_escape_non_printable(const char *str);
 
 char *utf16_to_utf8(const void *s, size_t length);