# utf8_open

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

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

## Parameters

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

## Called by

- [`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#L2845)
- [`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#L1205)
- [`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#L652)

## Calls

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

## Referenced by

- [`format_draw`](/en/tmux/latest/reference/c-function-format_draw/) (function)
- [`format_trim_left`](/en/tmux/latest/reference/c-function-format_trim_left/) (function)
- [`format_trim_right`](/en/tmux/latest/reference/c-function-format_trim_right/) (function)
- [`format_width`](/en/tmux/latest/reference/c-function-format_width/) (function)
- [`key_string_lookup_string`](/en/tmux/latest/reference/c-function-key_string_lookup_string/) (function)
- [`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)
- [`utf8_cstrwidth`](/en/tmux/latest/reference/c-function-utf8_cstrwidth/) (function)
- [`utf8_fromcstr`](/en/tmux/latest/reference/c-function-utf8_fromcstr/) (function)
- [`utf8_isvalid`](/en/tmux/latest/reference/c-function-utf8_isvalid/) (function)
- [`utf8_sanitize`](/en/tmux/latest/reference/c-function-utf8_sanitize/) (function)
- [`utf8_strvis`](/en/tmux/latest/reference/c-function-utf8_strvis/) (function)

## Referenced declarations

- [`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_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_state`](/en/tmux/latest/reference/c-enum-utf8_state/) (enum)
