mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-15 01:01:15 -03:00
As mentioned in https://github.com/fish-shell/fish-shell/pull/9688#discussion_r1155089596, commitb77d1d0e2b(Stop crashing on invalid Unicode input, 2024-02-27), Rust's char type doesn't support arbitrary 32-bit values. Out-of-range Unicode codepoints would cause crashes. That commit addressed this by converting the encoded bytes (e.g. UTF-8) to special private-use-area characters that fish knows about. It didn't bother to update the code path in builtin read that relies on mbrtowc as well. Fix that. Move and rename parse_codepoint() and rename/reorder its input/output parameters. Fixes #11383 (cherry picked from commitd9ba27f58f)