Closed WojciechP closed 4 months ago
The difference between WezTerm and Terminal.app seems to be that Terminal.app has LC_CTYPE="UTF-8"
while WezTerm has LC_CTYPE="C"
.
In the output of the locale
command, anything that says "C" means "no Unicode support". For example, here's what I get on Debian Linux:
LANG=en_AU.UTF-8
LANGUAGE=en_AU:en
LC_CTYPE="en_AU.UTF-8"
LC_NUMERIC="en_AU.UTF-8"
LC_TIME="en_AU.UTF-8"
LC_COLLATE="en_AU.UTF-8"
LC_MONETARY="en_AU.UTF-8"
LC_MESSAGES="en_AU.UTF-8"
LC_PAPER="en_AU.UTF-8"
LC_NAME="en_AU.UTF-8"
LC_ADDRESS="en_AU.UTF-8"
LC_TELEPHONE="en_AU.UTF-8"
LC_MEASUREMENT="en_AU.UTF-8"
LC_IDENTIFICATION="en_AU.UTF-8"
LC_ALL=
According to https://github.com/mawww/kakoune/issues/3768 your situation seems to be what happens when the "system language" and "region" are set to different things in the macOS System Preferences app.
Indeed, I missed the LC_CTYPE difference - thank you!
Having restarted everything, I get UTF8-enabled locale
output, and kakoune under WezTerm works just fine. I will chalk it up to "something went wrong somewhere when I was messing around with my setup", as I cannot reproduce the issue any more. And yes, my language and region settings don't match, but now that it's not causing any trouble any more I'll leave it as it is.
Thank you for such a quick response in any case!
Version of Kakoune
Kakoune 2024.05.18
Reproducer
Using kak under WezTerm when editing or viewing non-ASCII UTF-8 characters seems broken. I understand this is most likely not a bug in kakoune, but rather a result of quirky interaction, but I'm out of ideas on how to debug.
Reproducing using wezterm 20240203-110809-5046fc22 the characters display correctly directly in bash under WezTerm, but badly inside kak:
Funnily enough, the same works fine under Terminal.app (apologies for a dark-on-dark colorscheme, I don't use Terminal.app at all):
I also tried running
kak -n
to skip loading my kakrc, didn't help. Any tips on how to troubleshoot appreciated.Outcome
The non-ascii characters show up as question marks on red diamond background.
Expectations
I would like kak under WezTerm to render UTF8 correctly.
Additional information