Skip to content
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

why Chinese cannot be displayed? #2741

Closed
strongyc opened this issue Jun 23, 2023 · 25 comments · Fixed by #3352
Closed

why Chinese cannot be displayed? #2741

strongyc opened this issue Jun 23, 2023 · 25 comments · Fixed by #3352
Labels
bug Something isn't working

Comments

@strongyc
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:
image

why Chinese cannot be displayed?

Version info:
commit=de69fbd6450178ae64d80180efa64a3bed6489e6, build date=2023-06-22T17:00:41Z, build source=unknown, version=de69fbd6, os=windows, arch=amd64, git version=2.36.1.windows.11

@strongyc strongyc added the bug Something isn't working label Jun 23, 2023
@moreant
Copy link

moreant commented Jun 25, 2023

我也有相同的问题,奇怪的是在 WSL2 没有这个问题

@w4ngzhen
Copy link

Same problem. Both windows cmd and WezTerm.

@soluty
Copy link

soluty commented Jul 4, 2023

我这里也是碰到一样的问题了,似乎就是lazygit本身的bug和终端无关, cmd,windows terminal和wezterm都有类似问题.

@Equationzhao
Copy link

😢 +1

@dragove
Copy link

dragove commented Jul 7, 2023

I have the same problem among wezterm/cmder and windows terminal.

None-ASCII font. Font sometimes rendered but soon disappear after moving mouse.

The behavior can be found in wez/wezterm#3705

@captainfffsama
Copy link

I have the same problem on windows terminal and git-bash...powershell have same problem

@lyj404
Copy link

lyj404 commented Aug 7, 2023

I have the same problem

1 similar comment
@zguiyang
Copy link

zguiyang commented Aug 10, 2023

I have the same problem

@hwgao
Copy link

hwgao commented Aug 16, 2023

Version 0.37.0 doesn't have this issue.

@lyj404
Copy link

lyj404 commented Aug 30, 2023

I feel like this issue has been forgotten

@godsay1983
Copy link

This is not friendly to the Chinese.

@ogios
Copy link

ogios commented Sep 11, 2023

On Linux, I use kitty and it works fine
but when it comes to windows terminal, this problem occurred, and sometimes even broke the commit window's border

@jesseduffield
Copy link
Owner

It sounds like this issue is specific to windows. Are there other TUIs on windows that correctly render chinese characters? It would be good to find out whether this is an issue on our end or an issue with the terminal

@dragove
Copy link

dragove commented Sep 11, 2023

It sounds like this issue is specific to windows. Are there other TUIs on windows that correctly render chinese characters? It would be good to find out whether this is an issue on our end or an issue with the terminal

As a refrence, gitui works fine in windows with windows terminal

@jesseduffield
Copy link
Owner

That's good to know. So it's an issue on our end, now we just need to know where the issue comes from. We use tcell to render to the terminal, and it does have a couple open issues relating to rendering chinese characters:
gdamore/tcell#621
gdamore/tcell#291

@Penguin-SAMA
Copy link

I have the same problem.

If this issue can't be fixed promptly, how can I change the default display language of lazygit in Windows?

@mark2185
Copy link
Collaborator

@Penguin-SAMA set the language in your config.yml, it's the language key.

@Penguin-SAMA
Copy link

@mark2185 After I changed the language key value to 'en', I am unable to run lazygit.

@mark2185
Copy link
Collaborator

Just to confirm, the config.yml looks something like this?

gui:
  language: 'en'

If it does look like that, could you please clarify what happens when you run lazygit?

@Penguin-SAMA
Copy link

Sorry, I made a mistake in my previous message. It's working fine now. Thank you for your help.

@road2coder
Copy link

@jesseduffield It seems the problems started with v0.38.0. v0.37.0 works fine.

@qrsp
Copy link

qrsp commented Feb 29, 2024

gdamore/tcell#621 has been resolved. I compiled lazygit using the updated tcell, and now Chinese characters are displayed correctly.

@stefanhaller
Copy link
Collaborator

That's awesome. I'll take care of bumping the tcell dependency.

@stefanhaller
Copy link
Collaborator

Could those of you who reported this problem and who are able to build from source please test if #3352 fixes the issue? Thanks!

stefanhaller added a commit that referenced this issue Mar 2, 2024
Bump our gocui dependency, which in turn bumps tcell to v2.7.1, which
should fix problems with multibyte characters on Windows.

Fixes #2741.
@moreant
Copy link

moreant commented Mar 2, 2024

Could those of you who reported this problem and who are able to build from source please test if #3352 fixes the issue? Thanks!

@stefanhaller @qrsp I cloned and executed the latest code, and the issue with displaying Chinese characters has been resolved. I am deeply thankful for the contributions of both individuals.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.