FredrikNoren / ungit

The easiest way to use git. On any platform. Anywhere.
MIT License
10.45k stars 638 forks source link

Character encoding error in verified pgp tooltip #1257

Open dave12311 opened 4 years ago

dave12311 commented 4 years ago

The tooltips for the verified PGP icon do not display the "PGP by:" text in the correct character encoding.

ylecuyer commented 4 years ago

Hi, could you provide a screenshot where a bad character encoding is visible and maybe a public git repo with this issue ?

I tried with ungit git repo and it is displayed correctly Screenshot_2020-01-07_22-56-36

dave12311 commented 4 years ago

It's supposed to be Horváth Dávid image It is fine using git log --show-signature image And this repo should have signed commits: https://github.com/dave12311/DnD-5e-LaTeX-Monster-Creator

campersau commented 4 years ago

@dave12311 can you please share your public key B5FAE25D2D4E6440 so we can try to reproduce it?

dave12311 commented 4 years ago

You can find it here.

campersau commented 4 years ago

By using LC_ALL=C (which was introduced in https://github.com/FredrikNoren/ungit/pull/1208) the charset is also reset to ASCII according to https://unix.stackexchange.com/a/87763 which does not support these special characters.

In the C locale, characters are single bytes, the charset is ASCII

On Ubuntu / macOS I have found a workaround by using LANGUAGE=en_US.UTF-8 instead but I am not sure if that will work on other distros / OSs too.

campersau commented 4 years ago

It also might be an issue with git, because in commit messages it works fine with LC_ALL=C: image

Hirse commented 4 years ago

@campersau If you have a branch with that change, I can test it on Windows.

campersau commented 4 years ago

@Hirse here it is: https://github.com/FredrikNoren/ungit/compare/env_language

dave12311 commented 4 years ago

I just noticed that it works fine in the VS Code extension.