e-unicode: Evolution Utilities Reference Manual

## e-unicode e-unicode |

## Functions

gchar * | e_utf8_from_gtk_event_key ()
gchar * | e_utf8_from_iconv_string_sized ()
gchar * | e_utf8_to_iconv_string_sized ()
gchar * | e_utf8_to_charset_string_sized ()
gchar * | e_utf8_from_locale_string_sized ()
gchar * | e_utf8_ensure_valid ()
gint | e_unichar_to_utf8 ()
gchar * | e_unicode_get_utf8 ()
gchar * | e_xml_get_translated_utf8_string_prop_by_name ()

## Description

## Functions

### e_utf8_from_gtk_event_key ()

    gchar *
    e_utf8_from_gtk_event_key (GtkWidget *widget,
                               guint keyval,
                               const gchar *string);

### e_utf8_from_iconv_string_sized ()

    gchar *
    e_utf8_from_iconv_string_sized (iconv_t ic,
                                    const gchar *string,
                                    gint bytes);

### e_utf8_to_iconv_string_sized ()

    gchar *
    e_utf8_to_iconv_string_sized (iconv_t ic,
                                  const gchar *string,
                                  gint bytes);

### e_utf8_to_charset_string_sized ()

    gchar *
    e_utf8_to_charset_string_sized (const gchar *charset,
                                    const gchar *string,
                                    gint bytes);

### e_utf8_from_locale_string_sized ()

    gchar *
    e_utf8_from_locale_string_sized (const gchar *string,
                                     gint bytes);

### e_utf8_ensure_valid ()

    gchar *
    e_utf8_ensure_valid (const gchar *string);

Ensures the returned string will be valid UTF-8 string, thus GTK+ functions expecting only valid UTF-8 text will not crash.

Returned pointer should be freed with `g_free()`.

#### Parameters

string | string to make valid UTF-8 |

#### Returns

a newly-allocated UTF-8 string

### e_unichar_to_utf8 ()

    gint
    e_unichar_to_utf8 (gint c,
                       gchar *outbuf);

Convert a single character to utf8

#### Parameters

c | a ISO10646 character code |
outbuf | output buffer, must have at least 6 bytes of space. If `NULL`, the length will be computed and returned and nothing will be written to `out` . |

#### Returns

number of bytes written

### e_unicode_get_utf8 ()

    gchar *
    e_unicode_get_utf8 (const gchar *text,
                        gunichar *out);

### e_xml_get_translated_utf8_string_prop_by_name ()

    gchar *
    e_xml_get_translated_utf8_string_prop_by_name
                                   (const xmlNode *parent,
                                    const xmlChar *prop_name);