GLib.unichar_fully_decompose
Description: Reference for GLib.unichar_fully_decompose

### Function

# GLibunichar_fully_decompose

since: 2.30

#### Declaration [src]

    gsize
    g_unichar_fully_decompose (
      gunichar ch,
      gboolean compat,
      gunichar* result,
      gsize result_len
    )

#### Description [src]

Computes the canonical or compatibility decomposition of a Unicode character. For compatibility decomposition, pass `TRUE` for `compat`; for canonical decomposition pass `FALSE` for `compat`.

The decomposed sequence is placed in `result`. Only up to `result_len` characters are written into `result`. The length of the full decomposition (irrespective of `result_len`) is returned by the function. For canonical decomposition, currently all decompositions are of length at most 4, but this may change in the future (very unlikely though). At any rate, Unicode does guarantee that a buffer of length 18 is always enough for both compatibility and canonical decompositions, so that is the size recommended. This is provided as `G_UNICHAR_MAX_DECOMPOSITION_LENGTH`.

See UAX#15 for details.

Available since: 2.30

#### Parameters

`ch`

  Type: `gunichar`

  A Unicode character.

`compat`

  Type: `gboolean`

  Whether perform canonical or compatibility decomposition.

`result`

  Type: `gunichar*`

  Location to store decomposed result, or `NULL`.

  The argument will be set by the function.
  The argument can be `NULL`.

`result_len`

  Type: `gsize`

  Length of `result`.

#### Return value

Type: `gsize`

The length of the full decomposition.