[][src]Type Definition irssi_sys::gunichar

type gunichar = guint32;

gunichar:

A type which can hold any UTF-32 or UCS-4 character code, also known as a Unicode code point.

If you want to produce the UTF-8 representation of a #gunichar, use g_ucs4_to_utf8(). See also g_utf8_to_ucs4() for the reverse process.

To print/scan values of this type as integer, use %G_GINT32_MODIFIER and/or %G_GUINT32_FORMAT.

The notation to express a Unicode code point in running text is as a hexadecimal number with four to six digits and uppercase letters, prefixed by the string "U+". Leading zeros are omitted, unless the code point would have fewer than four hexadecimal digits. For example, "U+0041 LATIN CAPITAL LETTER A". To print a code point in the U+-notation, use the format string "U+%04"G_GINT32_FORMAT"X". To scan, use the format string "U+%06"G_GINT32_FORMAT"X".

|[ gunichar c; sscanf ("U+0041", "U+%06"G_GINT32_FORMAT"X", &c) g_print ("Read U+%04"G_GINT32_FORMAT"X", c); ]|