Macros | |
#define | UNI_MAX_HEADER_SIZE 3 |
#define | UNI_MAX_UTF8_SIZE 3 |
Define a ID for each text format | |
PS: This defines numbers are extract of ID3 norms | |
#define | UNI_TYPE_UNKNOWN 0xFF |
#define | UNI_TYPE_ASCII 0x00 |
#define | UNI_TYPE_UTF16LE 0x01 |
#define | UNI_TYPE_UTF16BE 0x02 |
#define | UNI_TYPE_UTF8 0x03 |
Functions | |
uint8_t | unicode_header_get (uint8_t *header, uint8_t txt_format) |
Return the header corresponding at text format identifier. More... | |
uint8_t | unicode_header_scan (uint8_t *header) |
Detect the text format via a header (3 bytes) More... | |
uint8_t | utf8_to_unicode (uint8_t *utf8, uint16_t *unicode) |
Conversion UTF-8 to unicode. More... | |
#define UNI_MAX_HEADER_SIZE 3 |
Referenced by reader_txt_beg(), and reader_txt_new().
#define UNI_MAX_UTF8_SIZE 3 |
Referenced by reader_txt_get_line().
#define UNI_TYPE_ASCII 0x00 |
Referenced by unicode_header_scan().
#define UNI_TYPE_UNKNOWN 0xFF |
#define UNI_TYPE_UTF16BE 0x02 |
Referenced by reader_txt_get_line(), unicode_header_get(), and unicode_header_scan().
#define UNI_TYPE_UTF16LE 0x01 |
Referenced by reader_txt_get_line(), unicode_header_get(), and unicode_header_scan().
#define UNI_TYPE_UTF8 0x03 |
Referenced by reader_txt_get_line(), unicode_header_get(), and unicode_header_scan().
uint8_t unicode_header_get | ( | uint8_t * | header, |
uint8_t | txt_format | ||
) |
Return the header corresponding at text format identifier.
txt_format | UNI_TYPE_UTF8, UNI_TYPE_UTF16BE, UNI_TYPE_UTF16LE, UNI_TYPE_ASCII |
header | header to fill (array of 3B) |
References UNI_TYPE_UTF16BE, UNI_TYPE_UTF16LE, and UNI_TYPE_UTF8.
Referenced by reader_txt_beg(), and reader_txt_new().
uint8_t unicode_header_scan | ( | uint8_t * | header | ) |
Detect the text format via a header (3 bytes)
header | header to analyze (array of 3B) |
References UNI_TYPE_ASCII, UNI_TYPE_UTF16BE, UNI_TYPE_UTF16LE, and UNI_TYPE_UTF8.
Referenced by reader_txt_beg().
uint8_t utf8_to_unicode | ( | uint8_t * | utf8, |
uint16_t * | unicode | ||
) |
Conversion UTF-8 to unicode.
utf8 | array with utf8 codes (array of 3B max) |
unicode | pointer used to store the character unicode decoded |
Referenced by reader_txt_get_line().