|
VLC
2.1.0-git
|

Functions | |
| int | utf8_vfprintf (FILE *stream, const char *fmt, va_list ap) |
| Formats an UTF-8 string as vfprintf(), then print it, with appropriate conversion to local encoding. | |
| int | utf8_fprintf (FILE *stream, const char *fmt,...) |
| Formats an UTF-8 string as fprintf(), then print it, with appropriate conversion to local encoding. | |
| size_t | vlc_towc (const char *str, uint32_t *restrict pwc) |
| Converts the first character from a UTF-8 sequence into a code point. | |
| char * | vlc_strcasestr (const char *haystack, const char *needle) |
| Look for an UTF-8 string within another one in a case-insensitive fashion. | |
| char * | EnsureUTF8 (char *str) |
| Replaces invalid/overlong UTF-8 sequences with question marks. | |
| const char * | IsUTF8 (const char *str) |
| Checks whether a string is a valid UTF-8 byte sequence. | |
| char * | FromCharset (const char *charset, const void *data, size_t data_size) |
| Converts a string from the given character encoding to utf-8. | |
| void * | ToCharset (const char *charset, const char *in, size_t *outsize) |
| Converts a nul-terminated UTF-8 string to a given character encoding. | |
| char* EnsureUTF8 | ( | char * | str | ) |
Replaces invalid/overlong UTF-8 sequences with question marks.
Note that it is not possible to convert from Latin-1 to UTF-8 on the fly, so we don't try that, even though it would be less disruptive.
References likely, and vlc_towc().
Referenced by filename_sanitize(), input_item_SetURI(), InputMetaUser(), and test().
| char* FromCharset | ( | const char * | charset, |
| const void * | data, | ||
| size_t | data_size | ||
| ) |
Converts a string from the given character encoding to utf-8.
References vlc_iconv(), vlc_iconv_close(), and vlc_iconv_open().
| const char* IsUTF8 | ( | const char * | str | ) |
Checks whether a string is a valid UTF-8 byte sequence.
| str | nul-terminated string to be checked |
References likely, and vlc_towc().
Referenced by IsSDPString(), and test().
| void* ToCharset | ( | const char * | charset, |
| const char * | in, | ||
| size_t * | outsize | ||
| ) |
Converts a nul-terminated UTF-8 string to a given character encoding.
| charset | iconv name of the character set |
| in | nul-terminated UTF-8 string |
| outsize | pointer to hold the byte size of result |
References unlikely, vlc_iconv(), vlc_iconv_close(), and vlc_iconv_open().
| int utf8_fprintf | ( | FILE * | stream, |
| const char * | fmt, | ||
| ... | |||
| ) |
Formats an UTF-8 string as fprintf(), then print it, with appropriate conversion to local encoding.
References utf8_vfprintf().
Referenced by Help(), libvlc_InternalInit(), ListModules(), print_help_on_full_help(), print_help_section(), PrintColorMsg(), PrintMsg(), Usage(), and Version().
| int utf8_vfprintf | ( | FILE * | stream, |
| const char * | fmt, | ||
| va_list | ap | ||
| ) |
Formats an UTF-8 string as vfprintf(), then print it, with appropriate conversion to local encoding.
References likely, unlikely, and vasprintf().
Referenced by PrintColorMsg(), PrintMsg(), and utf8_fprintf().
| char* vlc_strcasestr | ( | const char * | haystack, |
| const char * | needle | ||
| ) |
Look for an UTF-8 string within another one in a case-insensitive fashion.
Beware that this is quite slow. Contrary to strcasestr(), this function works regardless of the system character encoding, and handles multibyte code points correctly.
| haystack | string to look into |
| needle | string to look for |
References unlikely, and vlc_towc().
Referenced by playlist_LiveSearchUpdateInternal(), and test_strcasestr().
| size_t vlc_towc | ( | const char * | str, |
| uint32_t *restrict | pwc | ||
| ) |
Converts the first character from a UTF-8 sequence into a code point.
| str | an UTF-8 bytes sequence |
References clz8, and unlikely.
Referenced by convert_xml_special_chars(), EnsureUTF8(), IsUTF8(), vlc_str2keycode(), and vlc_strcasestr().
1.8.1.2