feat: add support for CJK unified ideographs (#243)

Fixes #242
This commit is contained in:
Alex Pasmantier 2025-01-07 13:32:32 +01:00 committed by GitHub
parent 072ecdba73
commit 3bd2bb44bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -257,6 +257,10 @@ pub fn replace_non_printable(
{ {
output.push(*NULL_SYMBOL); output.push(*NULL_SYMBOL);
} }
// CJK Unified Ideographs
c if ('\u{4E00}'..='\u{9FFF}').contains(&c) => {
output.push(c);
}
// Unicode characters above 0x0700 seem unstable with ratatui // Unicode characters above 0x0700 seem unstable with ratatui
c if c > '\u{0700}' => { c if c > '\u{0700}' => {
output.push(*NULL_SYMBOL); output.push(*NULL_SYMBOL);