|
VLC
4.0.0-dev
|

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. More... | |
| int | utf8_fprintf (FILE *stream, const char *fmt,...) |
| Formats an UTF-8 string as fprintf(), then print it, with appropriate conversion to local encoding. More... | |
| size_t | vlc_towc (const char *str, uint32_t *restrict pwc) |
| Decodes a code point from UTF-8. More... | |
| char * | vlc_strcasestr (const char *haystack, const char *needle) |
| Look for an UTF-8 string within another one in a case-insensitive fashion. More... | |
| char * | FromCharset (const char *charset, const void *data, size_t data_size) |
| Converts a string from the given character encoding to utf-8. More... | |
| void * | ToCharset (const char *charset, const char *in, size_t *outsize) |
| Converts a nul-terminated UTF-8 string to a given character encoding. More... | |
| 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().
Referenced by vlc_readdir().
| 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 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 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().
| size_t vlc_towc | ( | const char * | str, |
| uint32_t *restrict | pwc | ||
| ) |
Decodes a code point from UTF-8.
Converts the first character in a UTF-8 sequence into a Unicode code point.
| str | an UTF-8 bytes sequence [IN] |
| pwc | address of a location to store the code point [OUT] |
| (size_t)-1 | not a valid UTF-8 sequence |
| 0 | null character (i.e. str points to an empty string) |
| 1 | (non-null) ASCII character |
| 2-4 | non-ASCII character |
References clz, unlikely, and vlc_assert_unreachable.
Referenced by EnsureUTF8(), IsUTF8(), print_desc(), vlc_str2keycode(), vlc_strcasestr(), vlc_swidth(), and vlc_xml_encode().
1.8.13