# utf8_append

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L657
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-utf8_append/

```c
enum utf8_state utf8_append(struct utf8_data *ud, u_char ch)
```

## Parameters

- `ud` (`struct utf8_data *`)
- `ch` (`u_char`)

## Called by

- [`format_draw`](/en/tmux/latest/reference/c-function-format_draw/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format-draw.c#L794)
- [`format_trim_left`](/en/tmux/latest/reference/c-function-format_trim_left/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format-draw.c#L1163)
- [`format_trim_right`](/en/tmux/latest/reference/c-function-format_trim_right/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format-draw.c#L1233)
- [`format_width`](/en/tmux/latest/reference/c-function-format_width/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format-draw.c#L1109)
- [`input_top_bit_set`](/en/tmux/latest/reference/c-function-input-c-input_top_bit_set/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/input.c#L2850)
- [`key_string_lookup_string`](/en/tmux/latest/reference/c-function-key_string_lookup_string/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/key-string.c#L306)
- [`status_prompt_paste`](/en/tmux/latest/reference/c-function-status-c-status_prompt_paste/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1208)
- [`tty_keys_next1`](/en/tmux/latest/reference/c-function-tty-keys-c-tty_keys_next1/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty-keys.c#L661)
- [`utf8_cstrwidth`](/en/tmux/latest/reference/c-function-utf8_cstrwidth/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L903)
- [`utf8_fromcstr`](/en/tmux/latest/reference/c-function-utf8_fromcstr/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L858)
- [`utf8_isvalid`](/en/tmux/latest/reference/c-function-utf8_isvalid/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L766)
- [`utf8_open`](/en/tmux/latest/reference/c-function-utf8_open/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L651)
- [`utf8_sanitize`](/en/tmux/latest/reference/c-function-utf8_sanitize/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L796)
- [`utf8_strvis`](/en/tmux/latest/reference/c-function-utf8_strvis/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L700)

## Calls

- [`fatalx`](/en/tmux/latest/reference/c-function-fatalx/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L662)
- [`utf8_width`](/en/tmux/latest/reference/c-function-utf8-c-utf8_width/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L676)

## Referenced by

- [`screen_write_strlen`](/en/tmux/latest/reference/c-function-screen_write_strlen/) (function)
- [`screen_write_vnputs`](/en/tmux/latest/reference/c-function-screen_write_vnputs/) (function)

## Referenced declarations

- [`utf8_data.data`](/en/tmux/latest/reference/c-struct-utf8_data-data/) (attribute)
- [`utf8_data.have`](/en/tmux/latest/reference/c-struct-utf8_data-have/) (attribute)
- [`utf8_data.size`](/en/tmux/latest/reference/c-struct-utf8_data-size/) (attribute)
- [`utf8_data`](/en/tmux/latest/reference/c-struct-utf8_data/) (struct)
- [`UTF8_DONE`](/en/tmux/latest/reference/c-enum-utf8_state-utf8_done/) (constant)
- [`UTF8_ERROR`](/en/tmux/latest/reference/c-enum-utf8_state-utf8_error/) (constant)
- [`UTF8_MORE`](/en/tmux/latest/reference/c-enum-utf8_state-utf8_more/) (constant)
- [`utf8_no_width`](/en/tmux/latest/reference/c-variable-utf8-c-utf8_no_width/) (attribute)
- [`utf8_state`](/en/tmux/latest/reference/c-enum-utf8_state/) (enum)
- [`utf8_data.width`](/en/tmux/latest/reference/c-struct-utf8_data-width/) (attribute)
- [`utf8_width_item.width`](/en/tmux/latest/reference/c-struct-utf8_width_item-width/) (attribute)
