# utf8_width

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

```c
static enum utf8_state utf8_width(struct utf8_data *ud, int *width)
```

## Parameters

- `ud` (`struct utf8_data *`)
- `width` (`int *`)

## Called by

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

## Calls

- [`log_debug`](/en/tmux/3.7c/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L563)
- [`utf8_find_in_width_cache`](/en/tmux/3.7c/reference/c-function-utf8-c-utf8_find_in_width_cache/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L560)
- [`utf8_towc`](/en/tmux/3.7c/reference/c-function-utf8_towc/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L558)

## Referenced declarations

- [`utf8_data`](/en/tmux/3.7c/reference/c-struct-utf8_data/) (struct)
- [`UTF8_DONE`](/en/tmux/3.7c/reference/c-enum-utf8_state-utf8_done/) (constant)
- [`UTF8_ERROR`](/en/tmux/3.7c/reference/c-enum-utf8_state-utf8_error/) (constant)
- [`utf8_state`](/en/tmux/3.7c/reference/c-enum-utf8_state/) (enum)
- [`utf8_width_item.wc`](/en/tmux/3.7c/reference/c-struct-utf8_width_item-wc/) (attribute)
- [`utf8_width_item.width`](/en/tmux/3.7c/reference/c-struct-utf8_width_item-width/) (attribute)
