# utf8_sanitize

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

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

## Parameters

- `src` (`const char *`)

## Called by

- [`cmdq_error`](/en/tmux/3.7c/reference/c-function-cmdq_error/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L885)
- [`server_client_print`](/en/tmux/3.7c/reference/c-function-server_client_print/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L2830)

## Calls

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

## Other function references

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

## Referenced declarations

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