XBinder
Version 2.9.x
|
Utility functions for converting UTF-16(LE|BE) strings to and from UTF-8. More...
#include "rtxsrc/rtxContext.h"
Go to the source code of this file.
Functions | |
EXTERNRT int | rtxUTF16LEToUTF8 (unsigned char *out, int outlen, const unsigned char *inb, int inlenb) |
This function converts a UTF-16LE string into a UTF-8 string. More... | |
EXTERNRT int | rtxUTF8ToUTF16LE (unsigned char *outb, int outlen, const unsigned char *in, int inlen) |
This function converts a UTF-8 string into a UTF-16LE string. More... | |
EXTERNRT int | rtxUTF8ToUTF16 (unsigned char *outb, int outlen, const unsigned char *in, int inlen) |
This function converts a UTF-8 string into a UTF-16 string. More... | |
EXTERNRT int | rtxUTF16BEToUTF8 (unsigned char *out, int outlen, const unsigned char *inb, int inlenb) |
This function converts a UTF-16BE string into a UTF-8 string. More... | |
EXTERNRT int | rtxUTF8ToUTF16BE (unsigned char *outb, int outlen, const unsigned char *in, int inlen) |
This function converts a UTF-8 string into a UTF-16BE string. More... | |
EXTERNRT int | rtxStreamUTF8ToUTF16 (OSCTXT *pctxt, const unsigned char *in, size_t inlen) |
This function takes a block of UTF-8 chars in and try to convert it to an UTF-16 block of chars, and write the converted chars to stream. More... | |
EXTERNRT int | rtxStreamUTF8ToUTF16LE (OSCTXT *pctxt, const unsigned char *in, size_t inlen) |
This function takes a block of UTF-8 chars in and try to convert it to an UTF-16LE block of chars, and write the converted chars to stream. More... | |
EXTERNRT int | rtxStreamUTF8ToUTF16BE (OSCTXT *pctxt, const unsigned char *in, size_t inlen) |
This function takes a block of UTF-8 chars in and try to convert it to an UTF-16BE block of chars, and write the converted chars to stream. More... | |
Utility functions for converting UTF-16(LE|BE) strings to and from UTF-8.
Definition in file rtxUTF16.h.
EXTERNRT int rtxStreamUTF8ToUTF16 | ( | OSCTXT * | pctxt, |
const unsigned char * | in, | ||
size_t | inlen | ||
) |
This function takes a block of UTF-8 chars in and try to convert it to an UTF-16 block of chars, and write the converted chars to stream.
pctxt | Pointer to context block structure. |
in | A pointer to an array of UTF-8 chars. |
inlen | The length of . |
EXTERNRT int rtxStreamUTF8ToUTF16BE | ( | OSCTXT * | pctxt, |
const unsigned char * | in, | ||
size_t | inlen | ||
) |
This function takes a block of UTF-8 chars in and try to convert it to an UTF-16BE block of chars, and write the converted chars to stream.
pctxt | Pointer to context block structure. |
in | A pointer to an array of UTF-8 chars. |
inlen | The length of . |
EXTERNRT int rtxStreamUTF8ToUTF16LE | ( | OSCTXT * | pctxt, |
const unsigned char * | in, | ||
size_t | inlen | ||
) |
This function takes a block of UTF-8 chars in and try to convert it to an UTF-16LE block of chars, and write the converted chars to stream.
pctxt | Pointer to context block structure. |
in | A pointer to an array of UTF-8 chars. |
inlen | The length of . |
EXTERNRT int rtxUTF16BEToUTF8 | ( | unsigned char * | out, |
int | outlen, | ||
const unsigned char * | inb, | ||
int | inlenb | ||
) |
This function converts a UTF-16BE string into a UTF-8 string.
A buffer large enough to hold the converted UTF-8 characters must be provided. A buffer providing 4 bytes-per-character should be large enough to hold the largest possible UTF-8 conversion. This function assumes the endian property is the same between the native type of this machine and the inputed one.
out | Buffer to hold converted string. |
outlen | Size of output buffer. |
inb | A pointer to an array of UTF-16LE passed as a byte array. |
inlenb | The length of in UTF-16LE characters. |
EXTERNRT int rtxUTF16LEToUTF8 | ( | unsigned char * | out, |
int | outlen, | ||
const unsigned char * | inb, | ||
int | inlenb | ||
) |
This function converts a UTF-16LE string into a UTF-8 string.
A buffer large enough to hold the converted UTF-8 characters must be provided. A buffer providing 4 bytes-per-character should be large enough to hold the largest possible UTF-8 conversion. This function assumes the endian property is the same between the native type of this machine and the inputed one.
out | Buffer to hold converted string. |
outlen | Size of output buffer. |
inb | A pointer to an array of UTF-16LE passed as a byte array. |
inlenb | The length of in UTF-16LE characters. |
EXTERNRT int rtxUTF8ToUTF16 | ( | unsigned char * | outb, |
int | outlen, | ||
const unsigned char * | in, | ||
int | inlen | ||
) |
This function converts a UTF-8 string into a UTF-16 string.
A buffer large enough to hold the converted UTF-16 characters must be provided.
outb | Buffer to hold converted string. |
outlen | Size of output buffer. |
in | A pointer to an array of UTF-8 chars |
inlen | The length of |
EXTERNRT int rtxUTF8ToUTF16BE | ( | unsigned char * | outb, |
int | outlen, | ||
const unsigned char * | in, | ||
int | inlen | ||
) |
This function converts a UTF-8 string into a UTF-16BE string.
A buffer large enough to hold the converted UTF-16 characters must be provided.
outb | Buffer to hold converted string. |
outlen | Size of output buffer. |
in | A pointer to an array of UTF-8 chars |
inlen | The length of |
EXTERNRT int rtxUTF8ToUTF16LE | ( | unsigned char * | outb, |
int | outlen, | ||
const unsigned char * | in, | ||
int | inlen | ||
) |
This function converts a UTF-8 string into a UTF-16LE string.
A buffer large enough to hold the converted UTF-16 characters must be provided.
outb | Buffer to hold converted string. |
outlen | Size of output buffer. |
in | A pointer to an array of UTF-8 chars |
inlen | The length of |