Home > Support > Documentation

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.


Defines

#define OS_IS_CHAR(c)
#define OS_IS_BLANK(c)   (((c) == 0x20) || ((c) == 0x09) || ((c) == 0xA) || ((c) == 0x0D))
#define OS_IS_BASECHAR(c)   rtxUCSIsBaseChar(c)
#define OS_IS_DIGIT(c)   rtxUCSIsDigit(c)
#define OS_IS_COMBINING(c)   rtxUCSIsCombining(c)
#define OS_IS_EXTENDER(c)   rtxUCSIsExtender(c)
#define OS_IS_IDEOGRAPHIC(c)   rtxUCSIsIdeographic(c)
#define OS_IS_LETTER(c)   (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c))
#define OS_IS_PUBIDCHAR(c)   xmlIsPubidChar(c)

Functions

const OSUTF8CHAR * rtxUCSToDynUTF8 (OSCTXT *pctxt, const OSUNICHAR *inbuf)
 This function converts a null-terminated Unicode string into a UTF-8 string.
OSBOOL rtxUCSIsChar (OS32BITCHAR c)
 rtxUCSIsChar:
OSBOOL rtxUCSIsBlank (OS32BITCHAR c)
 rtxUCSIsBlank:
OSBOOL rtxUCSIsBaseChar (OS32BITCHAR c)
 rtxUCSIsBaseChar:
OSBOOL rtxUCSIsDigit (OS32BITCHAR c)
 rtxUCSIsDigit:
OSBOOL rtxUCSIsCombining (OS32BITCHAR c)
 rtxUCSIsCombining:
OSBOOL rtxUCSIsExtender (OS32BITCHAR c)
 rtxUCSIsExtender:
OSBOOL rtxUCSIsIdeographic (OS32BITCHAR c)
 rtxUCSIsIdeographic:
OSBOOL rtxUCSIsLetter (OS32BITCHAR c)
 rtxUCSIsLetter:
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

OSBOOL rtxUCSIsBaseChar ( OS32BITCHAR  c  ) 

rtxUCSIsBaseChar:

Parameters:
c,: an 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

OSBOOL rtxUCSIsBlank ( OS32BITCHAR  c  ) 

rtxUCSIsBlank:

Parameters:
c,: a 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

OSBOOL rtxUCSIsChar ( OS32BITCHAR  c  ) 

rtxUCSIsChar:

Parameters:
c,: an 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

OSBOOL rtxUCSIsCombining ( OS32BITCHAR  c  ) 

rtxUCSIsCombining:

Parameters:
c,: an 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

OSBOOL rtxUCSIsDigit ( OS32BITCHAR  c  ) 

rtxUCSIsDigit:

Parameters:
c,: an 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

OSBOOL rtxUCSIsExtender ( OS32BITCHAR  c  ) 

rtxUCSIsExtender:

Parameters:
c,: an 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

OSBOOL rtxUCSIsIdeographic ( OS32BITCHAR  c  ) 

rtxUCSIsIdeographic:

Parameters:
c,: an 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

OSBOOL rtxUCSIsLetter ( OS32BITCHAR  c  ) 

rtxUCSIsLetter:

Parameters:
c,: an unicode character (int)
Check whether the character is allowed by the production [84] Letter ::= BaseChar | Ideographic

Returns 0 if not, non-zero otherwise

OSBOOL rtxUCSIsPubidChar ( OS32BITCHAR  c  ) 

rtxUCSIsPubidChar:

Parameters:
c,: an 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

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.