Function

GLibunichar_to_utf8

Declaration

gint
g_unichar_to_utf8 (
  gunichar c,
  gchar* outbuf
)

Description

Converts a single character to UTF-8.

Parameters

c gunichar
 

A Unicode character code.

outbuf gchar*
 

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 outbuf.

 The argument will be set by the function.
 The argument can be NULL.
 The value is a NUL terminated UTF-8 string.

Return value

Returns: gint
 

Number of bytes written.