|
muteki
|
UTF-16 conversion utilities. More...
#include <muteki/common.h>Go to the source code of this file.
Typedefs | |
| typedef enum utf16_mb_encoding_e | utf16_mb_encoding_e |
| Supported encoding types. | |
Enumerations | |
| enum | utf16_mb_encoding_e { MB_ENCODING_CP936 = 0x0001 , MB_ENCODING_CP950 = 0x0002 , MB_ENCODING_CP932 = 0x0004 , MB_ENCODING_CP949 = 0x0008 , MB_ENCODING_CP874 = 0x0010 , MB_ENCODING_CP1252 = 0x1000 , MB_ENCODING_UTF8 = 0x7fff , MB_ENCODING_UTF16 = 0x8000 , MB_ENCODING_DEFAULT = 0xffff } |
| Supported encoding types. More... | |
Functions | |
| UTF16 | ConvCharToUnicode (unsigned int src, unsigned short src_encoding) |
| Convert a multi-byte codepoint to UTF-16. | |
| UTF16 * | ConvStrToUnicode (const void *src, UTF16 *dst, unsigned short src_encoding) |
| Convert a multi-byte string to UTF-16. | |
UTF-16 conversion utilities.
Provides utility functions to convert strings of various types of encoding to UTF-16.
| enum utf16_mb_encoding_e |
Supported encoding types.
| Enumerator | |
|---|---|
| MB_ENCODING_CP936 | Use CP936 (GB18030-based). Supported by both ConvStrToUnicode() and ConvCharToUnicode(). |
| MB_ENCODING_CP950 | Use CP950 (BIG5-based). Supported by both ConvStrToUnicode() and ConvCharToUnicode(). |
| MB_ENCODING_CP932 | Use CP932 (Shift-JIS-based). Supported by both ConvStrToUnicode() and ConvCharToUnicode(). |
| MB_ENCODING_CP949 | Use CP949 (EUC-KR-based). Supported by both ConvStrToUnicode() and ConvCharToUnicode(). |
| MB_ENCODING_CP874 | Use CP874 (TIS-620-based). Supported by ConvStrToUnicode() only. |
| MB_ENCODING_CP1252 | Use CP1252 (ISO8859-1-based). Supported by ConvStrToUnicode() only.
|
| MB_ENCODING_UTF8 | Use UTF-8. Supported by ConvStrToUnicode() only. |
| MB_ENCODING_UTF16 | Use UTF-16. Supported by both ConvStrToUnicode() and ConvCharToUnicode(). |
| MB_ENCODING_DEFAULT | Use default encoding. On BA742 this is hardcoded to be CP936. Supported by both ConvStrToUnicode() and ConvCharToUnicode(). |
|
extern |
Convert a multi-byte codepoint to UTF-16.
0x100bc | src | Multi-byte codepoint. |
| src_encoding | Encoding type of the input codepoint. |
Convert a multi-byte string to UTF-16.
0x100bd | [in] | src | Source multi-byte string. |
| [out] | dst | Converted UTF-16 string. |
| src_encoding | Encoding type of the input codepoint. |