zenilib
0.5.3.0
|
Go to the source code of this file.
Macros | |
#define | ENCODING_UCS2NATIVE ENCODING_UCS2BE |
#define | ENCODING_UCS4NATIVE ENCODING_UCS4BE |
#define | ENCODING_UTF16NATIVE ENCODING_UTF16BE |
#define | ENCODING_UTF32NATIVE ENCODING_UTF32BE |
#define | UNICODE_BOM 0xFEFF |
#define | UNKNOWN_ASCII '?' |
#define | UNKNOWN_UNICODE 0xFFFD |
Functions | |
static const char * | getlocale (char *buffer, size_t bufsize) |
size_t | SDL_iconv (SDL_iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft) |
int | SDL_iconv_close (SDL_iconv_t cd) |
SDL_iconv_t | SDL_iconv_open (const char *tocode, const char *fromcode) |
char * | SDL_iconv_string (const char *tocode, const char *fromcode, const char *inbuf, size_t inbytesleft) |
Variables | |
struct { | |
int format | |
const char * name | |
} | encodings [] |
#define ENCODING_UCS2NATIVE ENCODING_UCS2BE |
Definition at line 112 of file SDL_iconv.c.
#define ENCODING_UCS4NATIVE ENCODING_UCS4BE |
Definition at line 113 of file SDL_iconv.c.
#define ENCODING_UTF16NATIVE ENCODING_UTF16BE |
Definition at line 110 of file SDL_iconv.c.
Referenced by SDL_iconv().
#define ENCODING_UTF32NATIVE ENCODING_UTF32BE |
Definition at line 111 of file SDL_iconv.c.
Referenced by SDL_iconv().
#define UNICODE_BOM 0xFEFF |
Definition at line 87 of file SDL_iconv.c.
Referenced by SDL_iconv().
#define UNKNOWN_ASCII '?' |
Definition at line 89 of file SDL_iconv.c.
Referenced by SDL_iconv().
#define UNKNOWN_UNICODE 0xFFFD |
Definition at line 90 of file SDL_iconv.c.
Referenced by SDL_iconv().
anonymous enum |
Definition at line 92 of file SDL_iconv.c.
Definition at line 165 of file SDL_iconv.c.
References NULL, SDL_getenv(), SDL_strchr(), SDL_strcmp(), and SDL_strlcpy().
Referenced by SDL_iconv_open().
size_t SDL_iconv | ( | SDL_iconv_t | cd, |
const char ** | inbuf, | ||
size_t * | inbytesleft, | ||
char ** | outbuf, | ||
size_t * | outbytesleft | ||
) |
Definition at line 240 of file SDL_iconv.c.
References ENCODING_ASCII, ENCODING_LATIN1, ENCODING_UCS2BE, ENCODING_UCS2LE, ENCODING_UCS4BE, ENCODING_UCS4LE, ENCODING_UTF16, ENCODING_UTF16BE, ENCODING_UTF16LE, ENCODING_UTF16NATIVE, ENCODING_UTF32, ENCODING_UTF32BE, ENCODING_UTF32LE, ENCODING_UTF32NATIVE, ENCODING_UTF8, SDL_FALSE, SDL_ICONV_E2BIG, SDL_ICONV_EINVAL, SDL_TRUE, UNICODE_BOM, UNKNOWN_ASCII, and UNKNOWN_UNICODE.
Referenced by SDL_iconv_string().
int SDL_iconv_close | ( | SDL_iconv_t | cd | ) |
Definition at line 844 of file SDL_iconv.c.
References SDL_free().
Referenced by SDL_iconv_string().
SDL_iconv_t SDL_iconv_open | ( | const char * | tocode, |
const char * | fromcode | ||
) |
Definition at line 200 of file SDL_iconv.c.
References ENCODING_UNKNOWN, encodings, getlocale(), i, SDL_arraysize, SDL_malloc(), and SDL_strcasecmp().
Referenced by SDL_iconv_string().
char* SDL_iconv_string | ( | const char * | tocode, |
const char * | fromcode, | ||
const char * | inbuf, | ||
size_t | inbytesleft | ||
) |
This function converts a string between encodings in one pass, returning a string that must be freed with SDL_free() or NULL on error.
Definition at line 855 of file SDL_iconv.c.
References NULL, SDL_iconv(), SDL_iconv_close(), SDL_ICONV_E2BIG, SDL_ICONV_EILSEQ, SDL_ICONV_EINVAL, SDL_ICONV_ERROR, SDL_iconv_open(), SDL_malloc(), SDL_memset(), and SDL_realloc().
struct { ... } encodings[] |
Referenced by bdf_cmap_char_index(), bdf_cmap_char_next(), pcf_cmap_char_index(), pcf_cmap_char_next(), and SDL_iconv_open().
Definition at line 130 of file SDL_iconv.c.
Definition at line 129 of file SDL_iconv.c.