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 data is owned by the caller of the function.
 The string is a NUL terminated UTF-8 string.

Return value

Returns: int
 

Number of bytes written.