#include <cdio/types.h>Go to the source code of this file.
Typedefs | |
| typedef cdio_charset_coverter_s | cdio_charset_coverter_t |
| Opaque characterset converter. | |
Functions | |
| cdio_charset_coverter_t * | cdio_charset_converter_create (const char *src_charset, const char *dst_charset) |
| Create a charset converter. | |
| void | cdio_charset_converter_destroy (cdio_charset_coverter_t *cnv) |
| Destroy a characterset converter. | |
| bool | cdio_charset_convert (cdio_charset_coverter_t *cnv, char *src, int src_len, char **dst, int *dst_len) |
| Convert a string from one character set to another. | |
| bool | cdio_charset_from_utf8 (cdio_utf8_t *src, char **dst, int *dst_len, const char *dst_charset) |
| Convert a string from UTF-8 to another charset. | |
| bool | cdio_charset_to_utf8 (char *src, size_t src_len, cdio_utf8_t **dst, const char *src_charset) |
| Convert a string from another charset to UTF-8. | |
| typedef struct cdio_charset_coverter_s cdio_charset_coverter_t |
Opaque characterset converter.
| bool cdio_charset_convert | ( | cdio_charset_coverter_t * | cnv, | |
| char * | src, | |||
| int | src_len, | |||
| char ** | dst, | |||
| int * | dst_len | |||
| ) |
Convert a string from one character set to another.
| cnv | A charset converter | |
| src | Source string | |
| src_len | Length of source string | |
| dst | Returns destination string | |
| dst_len | If non NULL, returns the length of the destination string |
| cdio_charset_coverter_t* cdio_charset_converter_create | ( | const char * | src_charset, | |
| const char * | dst_charset | |||
| ) |
Create a charset converter.
| src_charset | Source charset | |
| dst_charset | Destination charset |
| void cdio_charset_converter_destroy | ( | cdio_charset_coverter_t * | cnv | ) |
Destroy a characterset converter.
| cnv | A characterset converter |
| bool cdio_charset_from_utf8 | ( | cdio_utf8_t * | src, | |
| char ** | dst, | |||
| int * | dst_len, | |||
| const char * | dst_charset | |||
| ) |
Convert a string from UTF-8 to another charset.
| src | Source string (0 terminated) | |
| dst | Returns destination string | |
| dst_len | If non NULL, returns the length of the destination string | |
| dst_charset | The characterset to convert to |
| bool cdio_charset_to_utf8 | ( | char * | src, | |
| size_t | src_len, | |||
| cdio_utf8_t ** | dst, | |||
| const char * | src_charset | |||
| ) |
Convert a string from another charset to UTF-8.
| src | Source string | |
| src_len | Length of the source string | |
| dst | Returns destination string (0 terminated) | |
| src_charset | The characterset to convert from |
1.4.7