diff options
Diffstat (limited to 'src/pulse/utf8.c')
-rw-r--r-- | src/pulse/utf8.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/pulse/utf8.c b/src/pulse/utf8.c index a02c5d1d..119be542 100644 --- a/src/pulse/utf8.c +++ b/src/pulse/utf8.c @@ -1,5 +1,3 @@ -/* $Id$ */ - /*** This file is part of PulseAudio. @@ -67,7 +65,7 @@ #define FILTER_CHAR '_' static inline int is_unicode_valid(uint32_t ch) { - + if (ch >= 0x110000) /* End of unicode space */ return 0; if ((ch & 0xFFFFF800) == 0xD800) /* Reserved area for UTF-16 */ @@ -76,7 +74,7 @@ static inline int is_unicode_valid(uint32_t ch) { return 0; if ((ch & 0xFFFE) == 0xFFFE) /* BOM (Byte Order Mark) */ return 0; - + return 1; } @@ -99,7 +97,7 @@ static char* utf8_validate(const char *str, char *output) { uint8_t *o; pa_assert(str); - + o = (uint8_t*) output; for (p = (const uint8_t*) str; *p; p++) { if (*p < 128) { @@ -208,7 +206,7 @@ static char* iconv_simple(const char *str, const char *to, const char *from) { pa_assert(str); pa_assert(to); pa_assert(from); - + cd = iconv_open(to, from); if (cd == (iconv_t)-1) return NULL; |