|  |  |  | Camel Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | ||||
void camel_utf8_putc (guchar **ptr, guint32 c); guint32 camel_utf8_getc (const guchar **ptr); guint32 camel_utf8_getc_limit (const guchar **ptr, const guchar *end); void g_string_append_u (GString *out, guint32 c); gchar * camel_utf7_utf8 (const gchar *ptr); gchar * camel_utf8_utf7 (const gchar *ptr); gchar * camel_utf8_ucs2 (const gchar *ptr); gchar * camel_ucs2_utf8 (const gchar *ptr); gchar * camel_utf8_make_valid (const gchar *text);
void                camel_utf8_putc                     (guchar **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 (const guchar **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. ptrwill be advanced to
the next character always. | 
guint32             camel_utf8_getc_limit               (const guchar **ptr,
                                                         const guchar *end);
Get the next utf8 gchar 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 gchar 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. | 
gchar * camel_utf7_utf8 (const gchar *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. | 
gchar * camel_utf8_utf7 (const gchar *ptr);
Convert a utf8 string to a modified utf7 format.
The IMAP rules [rfc2060] are used in the utf7 encoding.
| 
 | |
| Returns : | 
gchar * camel_utf8_ucs2 (const gchar *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 : | 
gchar * camel_ucs2_utf8 (const gchar *ptr);
Convert a ucs2 string into a utf8 one. The ucs2 string is treated as network byte ordered, and terminated with a 16 bit NUL.
| 
 | |
| Returns : |