Skip to content

ISO-8859-15 character set not supported #1336

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

Closed
mjk-gh opened this issue May 26, 2021 · 3 comments
Closed

ISO-8859-15 character set not supported #1336

mjk-gh opened this issue May 26, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@mjk-gh
Copy link

mjk-gh commented May 26, 2021

Describe the bug
My character set, ISO-8859-15 (Latin9), is not supported.

To Reproduce
Steps to reproduce the behavior:

$ git init test
Initialized empty Git repository in /tmp/test/.git/
$ lazygit
2021/05/26 15:22:01 An error occurred! Please create an issue at: https://github.com/jesseduffield/lazygit/issues

*errors.errorString character set not supported
/home/runner/work/lazygit/lazygit/main.go:134 (0xa2f7fb)
/opt/hostedtoolcache/go/1.16.3/x64/src/runtime/proc.go:225 (0x4389d6)
/opt/hostedtoolcache/go/1.16.3/x64/src/runtime/asm_amd64.s:1371 (0x46c621)
$ echo $?
1
$ echo $LC_CTYPE
en_US.ISO-8859-15
$ echo $LANG
en_US.ISO-8859-15
$

Expected behavior
lazygit should work without problems.

From what I see on the screenshots/casts, all characters could be replaced by even 7-bit ASCII variants:

  • up/down arrow in status panel: ^/v or u/d
  • "left/right/up/down arrow: navigate" in bottom line: "left/right/up/down: navigate" or "cursor keys: navigate"
  • line drawing characters: Either use "+-|" or use ncurses extended charset, which is supposedly compatible to everything:
    URL: http://melvilletheatre.com/articles/ncurses-extended-characters/index.html
    "Extended characters are designed to be portable between terminals, and should generate usable output from anything that you can run NCURSES on."

Desktop:

References
Might be related to #24 and #422.

@mjk-gh mjk-gh added the bug Something isn't working label May 26, 2021
@jesseduffield
Copy link
Owner

@mjk-gh could you see if this PR fixes the issue? #1490

@mjk-gh
Copy link
Author

mjk-gh commented Sep 26, 2021

Seems to work mostly!

Looks like this:

LC_CTYPE__en_US ISO-8859-15

Test with different user:

openbox-bash-negative-latin9

Test with different user, Latin1 (ISO-8859-1):

openbox-bash-negative-latin1

Test with different user, UTF8:

openbox-bash-negative-utf8

The only two noticeable problems on these screenshots:

  • Top left and right corner of collapsed/backgrounded panels have a question mark instead of a horizontal line drawing character (non-UTF8 screenshots only)
  • The help text in the bottommost line gets partially overwritten by "Donate Ask Question" (all screenshots)

The double quote-mark left of "init-this-repo.sh" is probably not a character conversion artifact, but means "untracked", I guess -- have not gotten around to really test lazygit because of the previous unability to start it at all.

@jesseduffield
Copy link
Owner

I reproduced that first issue locally and I've resolved it by just using spaces instead of those edge characters (given that using direct hyphens looks weird and tcell won't let me use the other hyphen-y characters as fallbacks).
The second issue you mention is actually normal (arguably the blue text should get priority though).

I've gone ahead and merged that PR. Lemme know if there are any more issues you come across and I'll re-open this issue :)

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

No branches or pull requests

2 participants