From 02a36bc9a1769c744f141f127898dbe076dbfd96 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Tue, 17 Sep 2013 15:39:09 -0400 Subject: move utf8 functions from libudev-private.h to utf8.h There's now some more obvious overlap amongst the two utf8 validation functions, but no more than there already was previously. This also adds some menial tests for anyone who wants to do more merging of these two in the future. --- src/shared/utf8.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/shared/utf8.h') diff --git a/src/shared/utf8.h b/src/shared/utf8.h index f805ea6b59..7a5608c9ee 100644 --- a/src/shared/utf8.h +++ b/src/shared/utf8.h @@ -34,3 +34,7 @@ char *utf8_filter(const char *s); char *ascii_filter(const char *s); char *utf16_to_utf8(const void *s, size_t length); + +int utf8_encoded_valid_unichar(const char *str); +int is_utf8_encoding_whitelisted(char c, const char *white); +int udev_encode_string(const char *str, char *str_enc, size_t len); -- cgit v1.2.3-54-g00ecf