|
ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
|
🔤 UTF-8 encoding and decoding with multi-byte character support More...
Go to the source code of this file.
Functions | |
| int | utf8_decode (const uint8_t *s, uint32_t *codepoint) |
| int | utf8_display_width (const char *str) |
| int | utf8_display_width_n (const char *str, size_t max_bytes) |
| size_t | utf8_char_count (const char *str) |
| bool | utf8_is_valid (const char *str) |
| bool | utf8_is_ascii_only (const char *str) |
| size_t | utf8_to_codepoints (const char *str, uint32_t *out_codepoints, size_t max_codepoints) |
| int | utf8_next_char_bytes (const char *str, size_t max_bytes) |
| int | utf8_continuation_bytes_needed (unsigned char first_byte) |
| int | utf8_read_and_insert_continuation_bytes (char *buffer, size_t *cursor, size_t *len, size_t max_len, int continuation_bytes, int(*read_byte_fn)(void)) |
| const char * | utf8_strcasestr (const char *haystack, const char *needle) |
| Case-insensitive substring search with full Unicode support. | |
🔤 UTF-8 encoding and decoding with multi-byte character support
Uses utf8proc Unicode library for accurate character-width computation and UTF-8 handling.
Definition in file utf8.c.
| size_t utf8_char_count | ( | const char * | str | ) |
Definition at line 138 of file utf8.c.
References utf8_decode().
Referenced by levenshtein(), and utf8_is_valid().
| int utf8_continuation_bytes_needed | ( | unsigned char | first_byte | ) |
Definition at line 224 of file utf8.c.
| int utf8_decode | ( | const uint8_t * | s, |
| uint32_t * | codepoint | ||
| ) |
Definition at line 18 of file utf8.c.
Referenced by digital_rain_apply(), interactive_grep_get_match_info(), utf8_char_count(), utf8_to_codepoints(), and validate_shell_safe().
| int utf8_display_width | ( | const char * | str | ) |
Definition at line 46 of file utf8.c.
Referenced by display_width(), layout_print_two_column_row(), options_config_calculate_max_col_width(), prompt_password(), and validate_palette_chars().
| int utf8_display_width_n | ( | const char * | str, |
| size_t | max_bytes | ||
| ) |
Definition at line 92 of file utf8.c.
Referenced by utf8_palette_create().
| bool utf8_is_ascii_only | ( | const char * | str | ) |
Definition at line 167 of file utf8.c.
Referenced by is_session_string(), and options_init().
| bool utf8_is_valid | ( | const char * | str | ) |
Definition at line 158 of file utf8.c.
References utf8_char_count().
Referenced by options_init(), prompt_password(), prompt_password_simple(), validate_private_key(), validate_public_key(), and validate_shell_safe().
| int utf8_next_char_bytes | ( | const char * | str, |
| size_t | max_bytes | ||
| ) |
Definition at line 207 of file utf8.c.
Referenced by layout_print_wrapped_description().
| int utf8_read_and_insert_continuation_bytes | ( | char * | buffer, |
| size_t * | cursor, | ||
| size_t * | len, | ||
| size_t | max_len, | ||
| int | continuation_bytes, | ||
| int(*)(void) | read_byte_fn | ||
| ) |
Definition at line 240 of file utf8.c.
| const char * utf8_strcasestr | ( | const char * | haystack, |
| const char * | needle | ||
| ) |
Case-insensitive substring search with full Unicode support.
Uses utf8proc for Unicode case folding according to Unicode standard. This properly handles all Unicode scripts including Greek, Cyrillic, accented characters, and more.
Definition at line 274 of file utf8.c.
Referenced by grep_highlight_colored(), grep_should_output(), interactive_grep_gather_and_filter_logs(), and interactive_grep_get_match_info().
| size_t utf8_to_codepoints | ( | const char * | str, |
| uint32_t * | out_codepoints, | ||
| size_t | max_codepoints | ||
| ) |
Definition at line 187 of file utf8.c.
References utf8_decode().
Referenced by levenshtein(), and validate_palette_chars().