Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Macros | |
#define | UTF_8_LEN_2_MASK 0xe0 |
#define | UTF_8_LEN_2_MATCH 0xc0 |
#define | UTF_8_LEN_3_MASK 0xf0 |
#define | UTF_8_LEN_3_MATCH 0xe0 |
#define | UTF_8_LEN_4_MASK 0xf8 |
#define | UTF_8_LEN_4_MATCH 0xf0 |
#define | UTF_8_CONTINUE_MASK 0xc0 |
#define | UTF_8_CONTINUE_MATCH 0x80 |
Functions | |
zip_encoding_type_t | _zip_guess_encoding (zip_string_t *str, zip_encoding_type_t expected_encoding) |
static zip_uint32_t | _zip_unicode_to_utf8_len (zip_uint32_t codepoint) |
static zip_uint32_t | _zip_unicode_to_utf8 (zip_uint32_t codepoint, zip_uint8_t *buf) |
zip_uint8_t * | _zip_cp437_to_utf8 (const zip_uint8_t *const _cp437buf, zip_uint32_t len, zip_uint32_t *utf8_lenp, zip_error_t *error) |
Variables | |
static const zip_uint16_t | _cp437_to_unicode [256] |
#define UTF_8_CONTINUE_MASK 0xc0 |
Definition at line 95 of file zip_utf-8.c.
#define UTF_8_CONTINUE_MATCH 0x80 |
Definition at line 96 of file zip_utf-8.c.
#define UTF_8_LEN_2_MASK 0xe0 |
Definition at line 89 of file zip_utf-8.c.
#define UTF_8_LEN_2_MATCH 0xc0 |
Definition at line 90 of file zip_utf-8.c.
#define UTF_8_LEN_3_MASK 0xf0 |
Definition at line 91 of file zip_utf-8.c.
#define UTF_8_LEN_3_MATCH 0xe0 |
Definition at line 92 of file zip_utf-8.c.
#define UTF_8_LEN_4_MASK 0xf8 |
Definition at line 93 of file zip_utf-8.c.
#define UTF_8_LEN_4_MATCH 0xf0 |
Definition at line 94 of file zip_utf-8.c.
zip_uint8_t* _zip_cp437_to_utf8 | ( | const zip_uint8_t *const | _cp437buf, |
zip_uint32_t | len, | ||
zip_uint32_t * | utf8_lenp, | ||
zip_error_t * | error | ||
) |
Definition at line 198 of file zip_utf-8.c.
References _cp437_to_unicode, _zip_unicode_to_utf8(), _zip_unicode_to_utf8_len(), buflen, error(), i, len, malloc(), NULL, ZIP_ER_MEMORY, and zip_error_set().
Referenced by _zip_string_get().
zip_encoding_type_t _zip_guess_encoding | ( | zip_string_t * | str, |
zip_encoding_type_t | expected_encoding | ||
) |
Definition at line 100 of file zip_utf-8.c.
References done, i, name, NULL, cmd_descs_generate::str, UTF_8_CONTINUE_MASK, UTF_8_CONTINUE_MATCH, UTF_8_LEN_2_MASK, UTF_8_LEN_2_MATCH, UTF_8_LEN_3_MASK, UTF_8_LEN_3_MATCH, UTF_8_LEN_4_MASK, UTF_8_LEN_4_MATCH, ZIP_ENCODING_ASCII, ZIP_ENCODING_CP437, ZIP_ENCODING_ERROR, ZIP_ENCODING_UNKNOWN, ZIP_ENCODING_UTF8_GUESSED, and ZIP_ENCODING_UTF8_KNOWN.
Referenced by _zip_dirent_read(), _zip_dirent_write(), _zip_set_name(), _zip_string_get(), _zip_string_new(), zip_file_set_comment(), and zip_set_archive_comment().
|
static |
Definition at line 173 of file zip_utf-8.c.
References UTF_8_CONTINUE_MATCH, UTF_8_LEN_2_MATCH, UTF_8_LEN_3_MATCH, and UTF_8_LEN_4_MATCH.
Referenced by _zip_cp437_to_utf8().
|
static |
|
static |
Definition at line 40 of file zip_utf-8.c.
Referenced by _zip_cp437_to_utf8().