Closed Aether2D closed 5 months ago
Hey,
thanks a lot for the detailed bug report! It describes really good, how the issue can be reproduced and what is effected. I'll take a look at it.
Managed to find out, what went wrong. It will be fixed in the next release. Now you can print e.g. Japanese characters and emojis without zjstatus escaping the line.
Describe the bug The status bar seems to render incorrectly when it displays emojis or Japanese,Chinese and Korean characters.
This only seems to happen with these languages as I tried Arabic,Hindi,Vietnamese and other languages that use the Cyrillic script and they all display correctly.
I thought this might be an issue with my terminal, so i tried Kitty,Alacritty & Foot but the issue persisted.
Expected behavior Here's what it's supposed to look like:
Here's what it looks like with Russian:
As i said before, these languages display correctly.
Now, The issue is when it displays any CJK character.
Here's what it looks like with Japanese:
Here's what it looks like with Korean:
Here's what it looks like with an emoji:
![4](https://github.com/dj95/zjstatus/assets/158233867/6099084d-5ad5-4c09-b9e1-aa1e3c64c307)
I think this might be an issue with how UTF-8 encodes characters. Here's a screenshot of the UTF-8 Wikipedia Page I Highlighted the important part![231218_03h38m33s_screenshot](https://github.com/dj95/zjstatus/assets/158233867/613e9d70-5908-4049-8b4a-9dd79880bc4a)
This mostly lines up with the problem, except for one thing. When I tried displaying these mathematical symbols:
√ ≜ E⊖
they display correctly:![6](https://github.com/dj95/zjstatus/assets/158233867/75833e38-a38f-4050-8107-4377cf88d9cb)
So now I am not so sure.
At first i thought it just wasn't rendering these characters for some reason but quickly discovered that it was rendering them, it was just out of bounds.
If i resize the window to a small enough size, you can see the characters:![7](https://github.com/dj95/zjstatus/assets/158233867/b0345739-2a1a-48b9-9b6e-a6e6f08d9d05)
Hence the "out of bounds"
Desktop (please complete the following information):
Layout
How does the layout look like? Please copy it into a code block.
I was trying to make zjstatus display the currently playing song and i realized it would just break if i was listening to touhou music. I quickly realized it was because of the Japanese characters in the song name.
I often listen to a lot of Japanese music and that's kind of how i found about this.