# utf8_from_data

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

```c
enum utf8_state utf8_from_data(const struct utf8_data *ud, utf8_char *uc)
```

## Parameters

- `ud` (`const struct utf8_data *`)
- `uc` (`utf8_char *`)

## Called by

- [`cmd_send_keys_inject_string`](/en/tmux/latest/reference/c-function-cmd-send-keys-c-cmd_send_keys_inject_string/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-send-keys.c#L141)
- [`grid_extended_cell`](/en/tmux/latest/reference/c-function-grid-c-grid_extended_cell/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L134)
- [`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#L309)
- [`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#L665)

## Calls

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

## Other function references

- [`utf8_put_item`](/en/tmux/latest/reference/c-function-utf8-c-utf8_put_item/) (function)

## Referenced by

- [`tty_keys_extended_key`](/en/tmux/latest/reference/c-function-tty-keys-c-tty_keys_extended_key/) (function)

## Referenced declarations

- [`utf8_data.data`](/en/tmux/latest/reference/c-struct-utf8_data-data/) (attribute)
- [`utf8_item.index`](/en/tmux/latest/reference/c-struct-utf8_item-index/) (attribute)
- [`utf8_data.size`](/en/tmux/latest/reference/c-struct-utf8_data-size/) (attribute)
- [`utf8_char`](/en/tmux/latest/reference/c-typedef-utf8_char/) (typealias)
- [`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_SET_SIZE`](/en/tmux/latest/reference/c-define-utf8-c-utf8_set_size/) (constant)
- [`UTF8_SET_WIDTH`](/en/tmux/latest/reference/c-define-utf8-c-utf8_set_width/) (constant)
- [`UTF8_SIZE`](/en/tmux/latest/reference/c-define-tmux-h-utf8_size/) (constant)
- [`utf8_state`](/en/tmux/latest/reference/c-enum-utf8_state/) (enum)
- [`utf8_data.width`](/en/tmux/latest/reference/c-struct-utf8_data-width/) (attribute)
