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

Issue:
CJK in Tab name
Using Fedora 37

The issue is not important, but still maybe a bug. 

When using layouts one is able to add CJK (Chinese, Japanese, Korean) Text as Tab/pane title. While the pane title shows this correctly, the Tab title stays blank. 

Example: 

tab name="Hello"      -> shows as  'Hello' correctly 
tab name="Helloば"  -> shows as '' ... blank
tab name="ば”　       -> is also blank 
Same with Kanji and Hangul. 

This shouldn't be a font issue, since pane name="" works flawlessly and the fonts are the same I assume.  
I have not tested using them in the status bar yet, but for users of non alphanumeric scripts this might be Interesting to look at. 





Discussion / hints:
@naosense - I think you did a similar fix for pane names, right? Or was that a different issue?
@imsnif yep, I think it is
@nikolasbertrand Are you using the latest merged code?
@naosense I am on the   with cargo packaged version : 0.34.4
> @imsnif yep, I think it is @nikolasbertrand Are you using the latest merged code?

Would you like to see if the fix can work here too? It's probably a very similar issue...

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


Test patch: