chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hwdb: fix dangling 'else' ambuguity
[elogind.git]
/
src
/
shared
/
utf8.h
diff --git
a/src/shared/utf8.h
b/src/shared/utf8.h
index e3eef11bb93137e3171f47c192ecad68f591e282..59abee50ac08bc2ad26aed8fd90bea76869a606e 100644
(file)
--- a/
src/shared/utf8.h
+++ b/
src/shared/utf8.h
@@
-25,12
+25,16
@@
#include "macro.h"
#include "macro.h"
+#define UTF8_REPLACEMENT_CHARACTER "\xef\xbf\xbd"
+
const char *utf8_is_valid(const char *s) _pure_;
char *ascii_is_valid(const char *s) _pure_;
const char *utf8_is_valid(const char *s) _pure_;
char *ascii_is_valid(const char *s) _pure_;
-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 *ascii_filter(const char *s);
+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);
char *utf16_to_utf8(const void *s, size_t length);