![]() |
![]() |
![]() |
Camel Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
void camel_utf8_putc (unsigned char **ptr, guint32 c); guint32 camel_utf8_getc (unsigned char **ptr); guint32 camel_utf8_getc_limit (unsigned char **ptr, unsigned char *end); void g_string_append_u (GString *out, guint32 c); char * camel_utf7_utf8 (const char *ptr); char * camel_utf8_utf7 (const char *ptr); char * camel_utf8_ucs2 (const char *ptr); char * camel_ucs2_utf8 (const char *ptr);
void camel_utf8_putc (unsigned char **ptr, guint32 c);
Output a 32 bit unicode character as utf8 octets. At most 4 octets will
be written to ptr
. ptr
will be advanced to the next character position.
|
|
|
guint32 camel_utf8_getc (unsigned char **ptr);
Get a Unicode character from a utf8 stream. ptr
will be advanced
to the next character position. Invalid utf8 characters will be
silently skipped. ptr
should point to a NUL terminated array.
|
|
Returns : |
The next Unicode character. ptr will be advanced to
the next character always.
|
guint32 camel_utf8_getc_limit (unsigned char **ptr, unsigned char *end);
Get the next utf8 char at ptr
, and return it, advancing ptr
to
the next character. If end
is reached before a full utf8
character can be read, then the invalid Unicode char 0xffff is
returned as a sentinel (Unicode 3.1, section 2.7), and ptr
is not
advanced.
|
|
|
must not be NULL. |
Returns : |
The next utf8 char, or 0xffff. |
char * camel_utf7_utf8 (const char *ptr);
Convert a modified utf7 string to utf8. If the utf7 string contains 8 bit characters, they are treated as iso-8859-1.
The IMAP rules [rfc2060] are used in the utf7 encoding.
|
|
Returns : |
The converted string. |
char * camel_utf8_utf7 (const char *ptr);
Convert a utf8 string to a modified utf7 format.
The IMAP rules [rfc2060] are used in the utf7 encoding.
|
|
Returns : |
char * camel_utf8_ucs2 (const char *ptr);
Convert a utf8 string into a ucs2 one. The ucs string will be in network byte order, and terminated with a 16 bit NULL.
|
|
Returns : |