# utf8_fromcstr

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

```c
struct utf8_data * utf8_fromcstr(const char *src)
```

## Parameters

- `src` (`const char *`)

## Called by

- [`cmd_send_keys_inject_string`](/en/tmux/3.7c/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#L136)
- [`key_string_lookup_string`](/en/tmux/3.7c/reference/c-function-key_string_lookup_string/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/key-string.c#L270)
- [`screen_write_text`](/en/tmux/3.7c/reference/c-function-screen_write_text/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L459)
- [`status_prompt_key`](/en/tmux/3.7c/reference/c-function-status_prompt_key/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1632)
- [`status_prompt_menu_callback`](/en/tmux/3.7c/reference/c-function-status-c-status_prompt_menu_callback/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L1947)
- [`status_prompt_set`](/en/tmux/3.7c/reference/c-function-status_prompt_set/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L715)
- [`status_prompt_update`](/en/tmux/3.7c/reference/c-function-status_prompt_update/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L790)
- [`utf8_add_to_width_cache`](/en/tmux/3.7c/reference/c-function-utf8-c-utf8_add_to_width_cache/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L381)
- [`utf8_cstrhas`](/en/tmux/3.7c/reference/c-function-utf8_cstrhas/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/utf8.c#L965)
- [`window_copy_cmd_jump_backward`](/en/tmux/3.7c/reference/c-function-window-copy-c-window_copy_cmd_jump_backward/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-copy.c#L2508)
- [`window_copy_cmd_jump_forward`](/en/tmux/3.7c/reference/c-function-window-copy-c-window_copy_cmd_jump_forward/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-copy.c#L2526)
- [`window_copy_cmd_jump_to_backward`](/en/tmux/3.7c/reference/c-function-window-copy-c-window_copy_cmd_jump_to_backward/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-copy.c#L2544)
- [`window_copy_cmd_jump_to_forward`](/en/tmux/3.7c/reference/c-function-window-copy-c-window_copy_cmd_jump_to_forward/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-copy.c#L2562)
- [`window_set_fill_character`](/en/tmux/3.7c/reference/c-function-window_set_fill_character/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L1872)

## Calls

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

## 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_data.size`](/en/tmux/3.7c/reference/c-struct-utf8_data-size/) (attribute)
- [`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_MORE`](/en/tmux/3.7c/reference/c-enum-utf8_state-utf8_more/) (constant)
