ZIm/crates/terminal/src
Shish 5cf0217549
terminal: Improve default locale handling (#18967)
terminal: Improve default locale handling

* Use `LANG` instead of `LC_ALL` (`LC_ALL` is the highest priority which
will override any other end-user settings; when that isn't set things
fall back to separate `LC_*` variables; and when those aren't set things
fall back to `LANG`). [0]
* Only set `LANG` for our child if necessary (if it already exists in
the parent, then the child will inherit that, no need for us to do
anything)

[0]
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_02

Tested cases:

- `unset LANG ; cargo run`: locale inside zed's terminal is set to
`en_US.UTF-8`
- `export LANG=en_GB.UTF-8 ; cargo run`: locale inside zed's terminal is
set to `en_GB.UTF-8`

Release Notes:

- Use the system locale in the terminal instead of forcing `en_US.UTF-8`
2024-10-11 18:09:24 +02:00
..
mappings Fix sending alt-enter in terminal (#18363) 2024-09-25 18:01:33 -04:00
pty_info.rs Update Rust crate sysinfo to 0.31.0 (#17733) 2024-09-17 21:50:37 +02:00
terminal.rs terminal: Improve default locale handling (#18967) 2024-10-11 18:09:24 +02:00
terminal_settings.rs Standardize on CursorShape::Underline not Underscore (#19028) 2024-10-11 10:44:21 +02:00