# utf8_sanitize

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/utf8.c#L408
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-utf8_sanitize/

```c
char * utf8_sanitize(const char *src)
```

## Parameters

- `src` (`const char *`)

## Called by

- [`cmdq_error`](/en/tmux/3.2a/reference/c-function-cmdq_error/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-queue.c#L855)
- [`cmdq_print`](/en/tmux/3.2a/reference/c-function-cmdq_print/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-queue.c#L811)

## Calls

- [`utf8_append`](/en/tmux/3.2a/reference/c-function-utf8_append/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/utf8.c#L420)
- [`xreallocarray`](/en/tmux/3.2a/reference/c-function-xreallocarray/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/utf8.c#L417)

## Other function references

- [`utf8_open`](/en/tmux/3.2a/reference/c-function-utf8_open/) (function)

## Referenced by

- [`session_new`](/en/tmux/3.2a/reference/c-function-session_new/) (function)

## Referenced declarations

- [`utf8_data.have`](/en/tmux/3.2a/reference/c-struct-utf8_data-have/) (attribute)
- [`UTF8_DONE`](/en/tmux/3.2a/reference/c-enum-utf8_state-utf8_done/) (constant)
- [`UTF8_MORE`](/en/tmux/3.2a/reference/c-enum-utf8_state-utf8_more/) (constant)
- [`utf8_data.width`](/en/tmux/3.2a/reference/c-struct-utf8_data-width/) (attribute)
