Repository: zellij-org/zellij (language: rust)

Issue:
UTF-8 doesn’t show up in title
**Basic information**

`zellij --version`: `zellij 0.34.4`
`stty size`: `51 239`
`uname -av` or `ver`(Windows): `Linux eg0 6.1.2-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 31 Dec 2022 17:40:35 +0000 x86_64 GNU/Linux`

**Reproducing**

Rename a tab or a pane with an "à, ê, é". I have tried with greek and cyrillic alphabet too.
The letter don’t show up in the title.

(This is my first issue, if i’m missing something, please tell me)


Discussion / hints:
Hey @AkiroPhi , thanks for your report! I'll take a look.
Hey @imsnif ,  i found code below will filter non-english char out, is this intend? In addition, printable unicode should be more than that.
https://github.com/zellij-org/zellij/blob/3da1cbf95c34283091186fd54926673fe2ec10f6/zellij-server/src/screen.rs#L1113-L1115
Hey @naosense - I think this is intended. Looking through git blame, it seems to have been a fix for: https://github.com/zellij-org/zellij/issues/1009

Maybe we can leave it as is but expand it to also include other special characters?

Fix patch:
diff --git a/zellij-server/src/screen.rs b/zellij-server/src/screen.rs
index 2c5e44b556..58ee541ea2 100644
--- a/zellij-server/src/screen.rs
+++ b/zellij-server/src/screen.rs
@@ -1110,7 +1110,7 @@ impl Screen {
                             },
                             c => {
                                 // It only allows printable unicode
-                                if buf.iter().all(|u| matches!(u, 0x20..=0x7E)) {
+                                if buf.iter().all(|u| matches!(u, 0x20..=0x7E | 0xA0..=0xFF)) {
                                     active_tab.name.push_str(c);
                                 }
                             },
diff --git a/zellij-server/src/tab/mod.rs b/zellij-server/src/tab/mod.rs
index 0cf3a69777..8ed75ea03e 100644
--- a/zellij-server/src/tab/mod.rs
+++ b/zellij-server/src/tab/mod.rs
@@ -2635,7 +2635,9 @@ impl Tab {
             .with_context(err_context)?;
 
             // It only allows printable unicode, delete and backspace keys.
-            let is_updatable = buf.iter().all(|u| matches!(u, 0x20..=0x7E | 0x08 | 0x7F));
+            let is_updatable = buf
+                .iter()
+                .all(|u| matches!(u, 0x20..=0x7E | 0xA0..=0xFF | 0x08 | 0x7F));
             if is_updatable {
                 let s = str::from_utf8(&buf).with_context(err_context)?;
                 active_terminal.update_name(s);


Test patch: