From 375e3ffed496c995383156f9675fa95f145e05bf Mon Sep 17 00:00:00 2001 From: Warren Dukes Date: Tue, 13 Apr 2004 02:20:46 +0000 Subject: add my own utf8/ascii converters and utf8 validator validate all mpd tags on import, if they are invalid, assume they are ascii and convert to utf8 git-svn-id: https://svn.musicpd.org/mpd/trunk@707 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/utf8.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/utf8.h (limited to 'src/utf8.h') diff --git a/src/utf8.h b/src/utf8.h new file mode 100644 index 000000000..1928a8a81 --- /dev/null +++ b/src/utf8.h @@ -0,0 +1,14 @@ +#ifndef UTF_8_H +#define UTF_8_H + +unsigned char * asciiToUtf8(unsigned char c); + +unsigned char * asciiStrToUtf8Dup(unsigned char * ascii); + +unsigned char utf8ToAscii(unsigned char * utf8); + +int validateUtf8Char(unsigned char * utf8Char); + +int validUtf8String(unsigned char * string); + +#endif -- cgit v1.2.3