# utf8_fromcstr

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/utf8.c#L472
- **Page:** https://libtmux.org/en/tmux/3.2a/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.2a/reference/c-function-cmd-send-keys-c-cmd_send_keys_inject_string/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-send-keys.c#L119)
- [`key_string_lookup_string`](/en/tmux/3.2a/reference/c-function-key_string_lookup_string/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/key-string.c#L191)
- [`screen_write_text`](/en/tmux/3.2a/reference/c-function-screen_write_text/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L390)
- [`status_prompt_key`](/en/tmux/3.2a/reference/c-function-status_prompt_key/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/status.c#L1229)
- [`status_prompt_menu_callback`](/en/tmux/3.2a/reference/c-function-status-c-status_prompt_menu_callback/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/status.c#L1506)
- [`status_prompt_set`](/en/tmux/3.2a/reference/c-function-status_prompt_set/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/status.c#L573)
- [`status_prompt_update`](/en/tmux/3.2a/reference/c-function-status_prompt_update/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/status.c#L644)
- [`utf8_cstrhas`](/en/tmux/3.2a/reference/c-function-utf8_cstrhas/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/utf8.c#L589)
- [`window_copy_cmd_jump_backward`](/en/tmux/3.2a/reference/c-function-window-copy-c-window_copy_cmd_jump_backward/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-copy.c#L1965)
- [`window_copy_cmd_jump_forward`](/en/tmux/3.2a/reference/c-function-window-copy-c-window_copy_cmd_jump_forward/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-copy.c#L1983)
- [`window_copy_cmd_jump_to_backward`](/en/tmux/3.2a/reference/c-function-window-copy-c-window_copy_cmd_jump_to_backward/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-copy.c#L2001)
- [`window_copy_cmd_jump_to_forward`](/en/tmux/3.2a/reference/c-function-window-copy-c-window_copy_cmd_jump_to_forward/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-copy.c#L2019)

## Calls

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

## 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_data.size`](/en/tmux/3.2a/reference/c-struct-utf8_data-size/) (attribute)
- [`utf8_data`](/en/tmux/3.2a/reference/c-struct-utf8_data/) (struct)
- [`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)
