Unicode

Unicode — Unicode and UTF-8 utility functions.

Synopsis




int         raptor_unicode_char_to_utf8     (unsigned long c,
                                             unsigned char *output);
int         raptor_utf8_to_unicode_char     (unsigned long *output,
                                             unsigned char *input,
                                             int length);
int         raptor_unicode_is_xml11_namestartchar
                                            (long c);
int         raptor_unicode_is_xml10_namestartchar
                                            (long c);
int         raptor_unicode_is_xml11_namechar
                                            (long c);
int         raptor_unicode_is_xml10_namechar
                                            (long c);
int         raptor_utf8_check               (unsigned char *string,
                                             size_t length);

Description

Functions to support converting to and from Unicode written in UTF-8 which is the native internal string format of all the redland libraries. Includes checking for Unicode names using either the XML 1.0 or XML 1.1 rules.

Details

raptor_unicode_char_to_utf8 ()

int         raptor_unicode_char_to_utf8     (unsigned long c,
                                             unsigned char *output);

Param1 :
output :
Returns :

raptor_utf8_to_unicode_char ()

int         raptor_utf8_to_unicode_char     (unsigned long *output,
                                             unsigned char *input,
                                             int length);

output :
input :
length :
Returns :

raptor_unicode_is_xml11_namestartchar ()

int         raptor_unicode_is_xml11_namestartchar
                                            (long c);

Param1 :
Returns :

raptor_unicode_is_xml10_namestartchar ()

int         raptor_unicode_is_xml10_namestartchar
                                            (long c);

Param1 :
Returns :

raptor_unicode_is_xml11_namechar ()

int         raptor_unicode_is_xml11_namechar
                                            (long c);

Param1 :
Returns :

raptor_unicode_is_xml10_namechar ()

int         raptor_unicode_is_xml10_namechar
                                            (long c);

Param1 :
Returns :

raptor_utf8_check ()

int         raptor_utf8_check               (unsigned char *string,
                                             size_t length);

Check a string is UTF-8.

string : UTF-8 string
length : length of string
Returns : Non 0 if the string is UTF-8