# utf8_to_data

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

```c
void utf8_to_data(utf8_char uc, struct utf8_data *ud)
```

## Parameters

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

## Called by

- [`grid_get_cell1`](/en/tmux/latest/reference/c-function-grid-c-grid_get_cell1/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/grid.c#L563)
- [`input_key`](/en/tmux/latest/reference/c-function-input_key/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/input-keys.c#L642)
- [`input_key_vt10x`](/en/tmux/latest/reference/c-function-input-keys-c-input_key_vt10x/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/input-keys.c#L502)
- [`key_string_lookup_key`](/en/tmux/latest/reference/c-function-key_string_lookup_key/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/key-string.c#L439)
- [`screen_print`](/en/tmux/latest/reference/c-function-screen_print/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen.c#L883)
- [`status_prompt_key`](/en/tmux/latest/reference/c-function-status_prompt_key/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1716)
- [`window_copy_cellstring`](/en/tmux/latest/reference/c-function-window-copy-c-window_copy_cellstring/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-copy.c#L3822)

## Calls

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

## Other function references

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

## Referenced by

- [`input_key_extended`](/en/tmux/latest/reference/c-function-input-keys-c-input_key_extended/) (function)

## Referenced declarations

- [`utf8_data.data`](/en/tmux/latest/reference/c-struct-utf8_data-data/) (attribute)
- [`utf8_item.data`](/en/tmux/latest/reference/c-struct-utf8_item-data/) (attribute)
- [`utf8_data.have`](/en/tmux/latest/reference/c-struct-utf8_data-have/) (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_GET_SIZE`](/en/tmux/latest/reference/c-define-utf8-c-utf8_get_size/) (constant)
- [`UTF8_GET_WIDTH`](/en/tmux/latest/reference/c-define-utf8-c-utf8_get_width/) (constant)
- [`utf8_data.width`](/en/tmux/latest/reference/c-struct-utf8_data-width/) (attribute)
