PulseAudio  5.0
utf8.h File Reference

UTF-8 validation functions. More...

Go to the source code of this file.

Functions

char * pa_utf8_valid (const char *str) PA_GCC_PURE
 Test if the specified strings qualifies as valid UTF8. More...
 
char * pa_ascii_valid (const char *str) PA_GCC_PURE
 Test if the specified strings qualifies as valid 7-bit ASCII. More...
 
char * pa_utf8_filter (const char *str)
 Filter all invalid UTF8 characters from the specified string, returning a new fully UTF8 valid string. More...
 
char * pa_ascii_filter (const char *str)
 Filter all invalid ASCII characters from the specified string, returning a new fully ASCII valid string. More...
 
char * pa_utf8_to_locale (const char *str)
 Convert a UTF-8 string to the current locale. More...
 
char * pa_locale_to_utf8 (const char *str)
 Convert a string in the current locale to UTF-8. More...
 

Detailed Description

UTF-8 validation functions.

Function Documentation

char* pa_ascii_filter ( const char *  str)

Filter all invalid ASCII characters from the specified string, returning a new fully ASCII valid string.

Don't forget to free the returned string with pa_xfree().

Since
0.9.15
char* pa_ascii_valid ( const char *  str)

Test if the specified strings qualifies as valid 7-bit ASCII.

Return the string if so, otherwise NULL.

Since
0.9.15
char* pa_locale_to_utf8 ( const char *  str)

Convert a string in the current locale to UTF-8.

Free the string using pa_xfree().

char* pa_utf8_filter ( const char *  str)

Filter all invalid UTF8 characters from the specified string, returning a new fully UTF8 valid string.

Don't forget to free the returned string with pa_xfree()

char* pa_utf8_to_locale ( const char *  str)

Convert a UTF-8 string to the current locale.

Free the string using pa_xfree().

char* pa_utf8_valid ( const char *  str)

Test if the specified strings qualifies as valid UTF8.

Return the string if so, otherwise NULL