XBinder  Version 2.9.x
Functions
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. More...
 
EXTERNRT const OSUTF8CHAR * rtxUCSToDynUTF8 (OSCTXT *pctxt, const OSUNICHAR *inbuf)
 This function converts a null-terminated Unicode string into a UTF-8 string. More...
 
EXTERNRT OSBOOL rtxUCSIsChar (OS32BITCHAR c)
 rtxUCSIsChar: More...
 
EXTERNRT OSBOOL rtxUCSIsBlank (OS32BITCHAR c)
 rtxUCSIsBlank: More...
 
EXTERNRT OSBOOL rtxUCSIsBaseChar (OS32BITCHAR c)
 rtxUCSIsBaseChar: More...
 
EXTERNRT OSBOOL rtxUCSIsDigit (OS32BITCHAR c)
 rtxUCSIsDigit: More...
 
EXTERNRT OSBOOL rtxUCSIsCombining (OS32BITCHAR c)
 rtxUCSIsCombining: More...
 
EXTERNRT OSBOOL rtxUCSIsExtender (OS32BITCHAR c)
 rtxUCSIsExtender: More...
 
EXTERNRT OSBOOL rtxUCSIsIdeographic (OS32BITCHAR c)
 rtxUCSIsIdeographic: More...
 
EXTERNRT OSBOOL rtxUCSIsLetter (OS32BITCHAR c)
 rtxUCSIsLetter: More...
 
EXTERNRT OSBOOL rtxUCSIsPubidChar (OS32BITCHAR c)
 rtxUCSIsPubidChar: More...
 
EXTERNRT OSBOOL rtxErrAddUniStrParm (OSCTXT *pctxt, const OSUNICHAR *pErrParm)
 This function adds a Unicode string parameter to an error information structure. More...
 

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

◆ rtxErrAddUniStrParm()

EXTERNRT OSBOOL rtxErrAddUniStrParm ( OSCTXT pctxt,
const OSUNICHAR *  pErrParm 
)

This function adds a Unicode string parameter to an error information structure.

Parameters
pctxtA pointer to a context structure.
pErrParmThe Unicode string error parameter.
Returns
The status of the operation (TRUE if the parameter was sucessfully added).

◆ rtxUCSIsBaseChar()

EXTERNRT OSBOOL rtxUCSIsBaseChar ( OS32BITCHAR  c)

rtxUCSIsBaseChar:

Parameters
can unicode character (int)

Check whether the character is allowed by the production [85] BaseChar ::= ... long list see REC ...

Returns 0 if not, non-zero otherwise

◆ rtxUCSIsBlank()

EXTERNRT OSBOOL rtxUCSIsBlank ( OS32BITCHAR  c)

rtxUCSIsBlank:

Parameters
ca UNICODE character (int)

Check whether the character is allowed by the production [3] S ::= (#x20 | #x9 | #xD | #xA)+ Also available as a macro IS_BLANK()

Returns 0 if not, non-zero otherwise

◆ rtxUCSIsChar()

EXTERNRT OSBOOL rtxUCSIsChar ( OS32BITCHAR  c)

rtxUCSIsChar:

Parameters
can unicode character (int)

Check whether the character is allowed by the production [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. Also available as a macro IS_CHAR()

Returns 0 if not, non-zero otherwise

◆ rtxUCSIsCombining()

EXTERNRT OSBOOL rtxUCSIsCombining ( OS32BITCHAR  c)

rtxUCSIsCombining:

Parameters
can unicode character (int)

Check whether the character is allowed by the production [87] CombiningChar ::= ... long list see REC ...

Returns 0 if not, non-zero otherwise

◆ rtxUCSIsDigit()

EXTERNRT OSBOOL rtxUCSIsDigit ( OS32BITCHAR  c)

rtxUCSIsDigit:

Parameters
can unicode character (int)

Check whether the character is allowed by the production [88] Digit ::= ... long list see REC ...

Returns 0 if not, non-zero otherwise

◆ rtxUCSIsExtender()

EXTERNRT OSBOOL rtxUCSIsExtender ( OS32BITCHAR  c)

rtxUCSIsExtender:

Parameters
can unicode character (int)

Check whether the character is allowed by the production [89] Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 | #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] | [#x309D-#x309E] | [#x30FC-#x30FE]

Returns 0 if not, non-zero otherwise

◆ rtxUCSIsIdeographic()

EXTERNRT OSBOOL rtxUCSIsIdeographic ( OS32BITCHAR  c)

rtxUCSIsIdeographic:

Parameters
can unicode character (int)

Check whether the character is allowed by the production [86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]

Returns 0 if not, non-zero otherwise

◆ rtxUCSIsLetter()

EXTERNRT OSBOOL rtxUCSIsLetter ( OS32BITCHAR  c)

rtxUCSIsLetter:

Parameters
can unicode character (int)

Check whether the character is allowed by the production [84] Letter ::= BaseChar | Ideographic

Returns 0 if not, non-zero otherwise

◆ rtxUCSIsPubidChar()

EXTERNRT OSBOOL rtxUCSIsPubidChar ( OS32BITCHAR  c)

rtxUCSIsPubidChar:

Parameters
can unicode character (int)

Check whether the character is allowed by the production [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]

Returns 0 if not, non-zero otherwise

◆ rtxUCSToDynUTF8()

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
pctxtPointer to context structure.
inbufNull-terminated Unicode string to convert.
Returns
Converted UTF-8 character string.

◆ rtxUCSToUTF8()

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
pctxtPointer to context structure.
inbufUnicode string to convert. Does not need to be null-terminated.
inlenNumber of characters in inbuf.
outbufBuffer to hold converted string.
outbufsizSize of output buffer.
Returns
Total number of bytes in converted string or a negative status code if error.