Unicode converter library.
More...
|
#define | EXTERN extern "C" |
|
Unicode converter library.
◆ uconv_utf8_to_ucs2()
int uconv_utf8_to_ucs2 |
( |
int |
src_size, |
|
|
uint8_t * |
src, |
|
|
int |
dst_size, |
|
|
uint16_t * |
dst |
|
) |
| |
Convert a string from UTF-8 format to UCS2.
- Parameters
-
[in] | src_size | Byte length of string encoded in UTF-8. |
[in] | src | String pointer encoded in UTF-8. |
[in] | dst_size | Maximum Byte length of UCS2 string buffer. |
[out] | dst | Pointer stores the character string converted to UCS2 format. |
- Returns
- On success, it returns the number of bytes in the converted string buffer. Otherwise negative value is returned according to <errno.h>.
◆ uconv_ucs2_to_utf8()
int uconv_ucs2_to_utf8 |
( |
int |
src_size, |
|
|
uint16_t * |
src, |
|
|
int |
dst_size, |
|
|
uint8_t * |
dst |
|
) |
| |
Convert a string from UCS2 format to UTF-8.
- Parameters
-
[in] | src_size | Byte length of string encoded in UCS2. |
[in] | src | String pointer encoded in UCS2. |
[in] | dst_size | Maximum Byte length of UTF-8 string buffer. |
[out] | dst | Pointer stores the character string converted to UTF-8 format. |
- Returns
- On success, it returns the number of bytes in the converted string buffer. Otherwise negative value is returned according to <errno.h>.