XBinder
Version 2.9.x
|
Utility functions for converting ISO 8859-1 strings to and from UTF-8. More...
#include "rtxsrc/rtxContext.h"
Go to the source code of this file.
Functions | |
EXTERNRT int | rtxLatin1ToUTF8 (const OSUTF8CHAR *inbuf, int inlen, OSUTF8CHAR *outbuf, int outbufsize) |
This function converts an ISO 8859-1 encoded string into a UTF-8 string. More... | |
EXTERNRT int | rtxUTF8ToLatin1 (const OSUTF8CHAR *inbuf, int inlen, OSUTF8CHAR *outbuf, int outbufsize) |
This function converts a UTF-8 encoded byte stream into an ISO 8859-1 encoded string. More... | |
EXTERNRT int | rtxStreamUTF8ToLatin1 (OSCTXT *pctxt, const OSUTF8CHAR *inbuf, size_t inlen) |
This function converts a UTF-8 encoded byte stream into an ISO 8859-1 encoded string, and write it to stream. More... | |
Utility functions for converting ISO 8859-1 strings to and from UTF-8.
Definition in file rtxLatin1.h.
EXTERNRT int rtxLatin1ToUTF8 | ( | const OSUTF8CHAR * | inbuf, |
int | inlen, | ||
OSUTF8CHAR * | outbuf, | ||
int | outbufsize | ||
) |
This function converts an ISO 8859-1 encoded 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.
inbuf | A pointer to an array of ISO 8859-1 characters. |
inlen | Number of ISO 8859-1 characters to be converted. |
outbuf | Buffer to hold converted string. |
outbufsize | Size of output buffer. |
EXTERNRT int rtxStreamUTF8ToLatin1 | ( | OSCTXT * | pctxt, |
const OSUTF8CHAR * | inbuf, | ||
size_t | inlen | ||
) |
This function converts a UTF-8 encoded byte stream into an ISO 8859-1 encoded string, and write it to stream.
pctxt | Pointer to context block structure. |
inbuf | A pointer to an array of UTF-8 string. |
inlen | Number of bytes of the input string. |
EXTERNRT int rtxUTF8ToLatin1 | ( | const OSUTF8CHAR * | inbuf, |
int | inlen, | ||
OSUTF8CHAR * | outbuf, | ||
int | outbufsize | ||
) |
This function converts a UTF-8 encoded byte stream into an ISO 8859-1 encoded string.
A buffer large enough to hold the converted characters must be provided.
inbuf | A pointer to an array of UTF-8 string. |
inlen | Number of bytes of the input string. |
outbuf | Buffer to hold converted string. |
outbufsize | Size of output buffer. |