-
-
Notifications
You must be signed in to change notification settings - Fork 162
Closed
Labels
S-bugSeverity: bugSeverity: bug
Description
What crate(s) in this repo are involved in the problem?
tokio-console
What is the issue?
impl Default for ViewOptions {
fn default() -> Self {
Self {
no_colors: false,
lang: Some("en_us.UTF8".to_string()), // 👈
ascii_only: Some(false),
truecolor: Some(true),
palette: Some(Palette::All),
toggles: ColorToggles {
color_durations: Some(true),
color_terminated: Some(true),
},
}
}
}
console/tokio-console/src/config.rs
Line 501 in 70fc2c5
lang: Some("en_us.UTF8".to_string()), |
"en_us.UTF-8"
is probably correct ? (with -
between UTF and 8)
then
impl ViewOptions {
pub fn is_utf8(&self) -> bool {
if self.ascii_only.unwrap_or(false) {
return false;
}
self.lang.as_deref().unwrap_or_default().ends_with("UTF-8") // 👈
}
//...
}
console/tokio-console/src/config.rs
Line 423 in 70fc2c5
self.lang.as_deref().unwrap_or_default().ends_with("UTF-8") |
in ViewOptions::is_utf8()
, lang is assumed to be UTF-8
How can the bug be reproduced?
tokio-console gen-config > ./console.toml
bat console.toml | rg lang
lang = 'en_us.UTF8'
Logs, error output, etc
No response
Versions
tokio-console 0.1.7
Possible solution
set "en_us.UTF-8"
to lang in Default::default
in ViewOptions
Additional context
No response
Would you like to work on fixing this bug?
yes
Metadata
Metadata
Assignees
Labels
S-bugSeverity: bugSeverity: bug