rtxUnicode.h File Reference
This is an open source header file derived from the libxml2 project. More...
#include <stdio.h>
#include "rtxsrc/rtxContext.h"
Go to the source code of this file.
Functions | |
EXTERNRT long | rtxUCSToUTF8 (OSCTXT *pctxt, const OSUNICHAR *inbuf, size_t inlen, OSOCTET *outbuf, size_t outbufsiz) |
This function converts a Unicode string into a UTF-8 string. | |
EXTERNRT const OSUTF8CHAR * | rtxUCSToDynUTF8 (OSCTXT *pctxt, const OSUNICHAR *inbuf) |
This function converts a null-terminated Unicode string into a UTF-8 string. | |
EXTERNRT OSBOOL | rtxUCSIsChar (OS32BITCHAR c) |
rtxUCSIsChar: | |
EXTERNRT OSBOOL | rtxUCSIsBlank (OS32BITCHAR c) |
rtxUCSIsBlank: | |
EXTERNRT OSBOOL | rtxUCSIsBaseChar (OS32BITCHAR c) |
rtxUCSIsBaseChar: | |
EXTERNRT OSBOOL | rtxUCSIsDigit (OS32BITCHAR c) |
rtxUCSIsDigit: | |
EXTERNRT OSBOOL | rtxUCSIsCombining (OS32BITCHAR c) |
rtxUCSIsCombining: | |
EXTERNRT OSBOOL | rtxUCSIsExtender (OS32BITCHAR c) |
rtxUCSIsExtender: | |
EXTERNRT OSBOOL | rtxUCSIsIdeographic (OS32BITCHAR c) |
rtxUCSIsIdeographic: | |
EXTERNRT OSBOOL | rtxUCSIsLetter (OS32BITCHAR c) |
rtxUCSIsLetter: | |
EXTERNRT OSBOOL | rtxUCSIsPubidChar (OS32BITCHAR c) |
rtxUCSIsPubidChar: |
Detailed Description
This is an open source header file derived from the libxml2 project.It defines UNICODE data types and macros. See the header file for further details.
Definition in file rtxUnicode.h.
Function Documentation
EXTERNRT OSBOOL rtxUCSIsBaseChar | ( | OS32BITCHAR | c | ) |
rtxUCSIsBaseChar:
- Parameters:
-
c,: an unicode character (int)
Returns 0 if not, non-zero otherwise
EXTERNRT OSBOOL rtxUCSIsBlank | ( | OS32BITCHAR | c | ) |
rtxUCSIsBlank:
- Parameters:
-
c,: a UNICODE character (int)
Returns 0 if not, non-zero otherwise
EXTERNRT OSBOOL rtxUCSIsChar | ( | OS32BITCHAR | c | ) |
rtxUCSIsChar:
- Parameters:
-
c,: an unicode character (int)
Returns 0 if not, non-zero otherwise
EXTERNRT OSBOOL rtxUCSIsCombining | ( | OS32BITCHAR | c | ) |
rtxUCSIsCombining:
- Parameters:
-
c,: an unicode character (int)
Returns 0 if not, non-zero otherwise
EXTERNRT OSBOOL rtxUCSIsDigit | ( | OS32BITCHAR | c | ) |
rtxUCSIsDigit:
- Parameters:
-
c,: an unicode character (int)
Returns 0 if not, non-zero otherwise
EXTERNRT OSBOOL rtxUCSIsExtender | ( | OS32BITCHAR | c | ) |
rtxUCSIsExtender:
- Parameters:
-
c,: an unicode character (int)
Returns 0 if not, non-zero otherwise
EXTERNRT OSBOOL rtxUCSIsIdeographic | ( | OS32BITCHAR | c | ) |
rtxUCSIsIdeographic:
- Parameters:
-
c,: an unicode character (int)
Returns 0 if not, non-zero otherwise
EXTERNRT OSBOOL rtxUCSIsLetter | ( | OS32BITCHAR | c | ) |
rtxUCSIsLetter:
- Parameters:
-
c,: an unicode character (int)
Returns 0 if not, non-zero otherwise
EXTERNRT OSBOOL rtxUCSIsPubidChar | ( | OS32BITCHAR | c | ) |
rtxUCSIsPubidChar:
- Parameters:
-
c,: an unicode character (int)
Returns 0 if not, non-zero otherwise
EXTERNRT const OSUTF8CHAR* rtxUCSToDynUTF8 | ( | OSCTXT * | pctxt, | |
const OSUNICHAR * | inbuf | |||
) |
This function converts a null-terminated Unicode string into a UTF-8 string.
Memory is allocated for the output string using the built-in memory management functions.
- Parameters:
-
pctxt Pointer to context structure. inbuf Null-terminated Unicode string to convert.
- Returns:
- Converted UTF-8 character string.
EXTERNRT long rtxUCSToUTF8 | ( | OSCTXT * | pctxt, | |
const OSUNICHAR * | inbuf, | |||
size_t | inlen, | |||
OSOCTET * | outbuf, | |||
size_t | outbufsiz | |||
) |
This function converts a Unicode 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. The output UTF-8 string is null-terminated.
- Parameters:
-
pctxt Pointer to context structure. inbuf Unicode string to convert. Does not need to be null-terminated. inlen Number of characters in inbuf. outbuf Buffer to hold converted string. outbufsiz Size of output buffer.
- Returns:
- Total number of bytes in converted string or a negative status code if error.