-
-
Notifications
You must be signed in to change notification settings - Fork 801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect rendering of (some?) unicode characters #220
Comments
Did you configure a specific font? |
This is what I see when I run I think we're missing something about your environment. https://wezfurlong.org/wezterm/faq.html has some relevant information. tmux can complicate things; I'd suggest first verifying that things work as expected without adding another layer of emulation so that there are fewer variables to isolate. |
Hmm, I didn't know that was relevant. But perhaps it really is. My font is
|
@wez You were right. Indeed, it looks like the problem arises from using
|
I suspect that your tmux/environment isn't configured correctly for utf8: https://github.com/tmux/tmux/wiki/FAQ#how-do-i-use-utf-8
That sounds like it is happening here. In addition to troubleshooting your tmux config/environment, you probably want this:
Some background on this: tmux originally piggy-backed on the terminfo for GNU screen, but as tmux added more features that terminfo no longer really described the feature set. |
One thing that may be happening: if you didn't have LANG set appropriately when you first started the tmux server, it may be stuck thinking you don't have UTF-8 until you kill off and restart tmux in an environment with LANG set. |
Thank you for the explanation. I shall look into my tmux and other things in my environment. The real question then is: "how is iterm2 working correctly?". iterm2 seriously covers a lot of ground on macOS. But it lacks GPU acceleration and cross-platform applicability, which really attracts me to wezterm. |
iterm2 has some logic to preset LANG to something reasonable, and I think that goes a long way to avoid some of these pitfalls. I'm looking at adding similar logic to wezterm because it is surprising. It's unfortunate that macOS doesn't set LANG appropriately by default. |
The reasonable default |
This is what I see with wezterm running the default configuration and with my tmux config (as shown in #220 (comment)) We established that this is an issue with your tmux configuration but it's not clear whether you restarted the tmux server or adjusted your tmux configuration since previously. While I'd like to see you achieve success, I don't have a lot of time to spend on working to extract troubleshooting information; terse one line statements about things not working don't help me to help you; you need to do some legwork and investigation to understand why tmux isn't working for you in wezterm when perhaps it is working in other terminal emulators. |
iterm2 have GPU aceleration using metal according to this: https://iterm2.com/downloads/stable/iTerm2-3_2_0.changelog |
@erf Thanks. I didn't know that @wez, with wezterm 20200620-160318-e00b076c, the Unicode characters render fine within |
My money is on the tmux server being started with the unset LANG and that sticking around. I'm happy to call this resolved! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Describe the bug
There is a problem in rendering (some?) Unicode characters. This felt (perhaps) dangerous to use Wezterm as the daily driver yet, because of the circumstances under which I discovered it. Let me explain.
I was editing a C++ scientific code with
wezterm
just now (this file was last edited a month back usingiterm2
), when I noticed some really strange_
in a formula (under comments). I tend to use the native Unicode for formula involving greek characters etc because they are so concise and by looking at the comment line (in a long C++ code), I can have a quick idea of what the programmer intended to implement (atleast the intention). As I said, I had last edited the file a month ago initerm2
and had put the Unicode comments. Now reopening the file inwezterm
, when my eyes reached the equation line, I couldn't exactly remember the formula, but saw a bunch of spurious underscores. And I started deleting them! After deleting a few, I realised that something must have gone wrong, before stopping myself and realising that I am now using a new terminal emulator.The screenshots below will tell the story better. They are open in the same
tmux
session live and the screenshots are taken at the same moment. Notice the commented line at the top.WezTerm rendering
iterm2 rendering
Environment
To Reproduce
Here are the relevant lines of code (not valid code, but just for testing purposes)
The text was updated successfully, but these errors were encountered: