You are not logged in.
Hi,
when I try to write characters like this:
ěščřžýáíé, they show up weirdly with visible ansi escape codes (see image). But when I echo them, they display correctly. It's broken only when I'm writing it in terminal (I tried alacritty, xterm and terminator) and when I'm using zsh (bash works fine). When I echo them, they display correctly. When I press <C-XE> to edit current line in vim, the characters display correctly.
The problem appeared after new install, I never encountered it on any machine, even though I use the same config everywhere. It doesn't matter which zsh config I use. Even when using no-config zsh or copying config directly from working machine, the issue still persists.
I tried completely purging and reinstalling Zsh. Even when I compile zsh from source, the issue still persists. I'm also encountering problems with autocomplete sometimes even without special characters, it looks like ansi escape code handling is somehow broken?
How does one debug this? Thanks

Last edited by Soptik (2020-07-24 07:33:38)
Offline
Does the TERM environment variable have the same value in your zsh and bash session?
Offline
Yes, it does, `xterm-256color` (on alacritty which is my main terminal, eg it's `xterm` on xterm, but it is broken the same on all terminals).
Offline
localectl
locale
locale -a
setxkbmap -print -queryOnline
root@lucy /home/petr # localectl
Could not get properties: Access denied
root@lucy /home/petr # locale
LANG=en_US.ISO-8859-1
LC_CTYPE="en_US.ISO-8859-1"
LC_NUMERIC="en_US.ISO-8859-1"
LC_TIME="en_US.ISO-8859-1"
LC_COLLATE="en_US.ISO-8859-1"
LC_MONETARY="en_US.ISO-8859-1"
LC_MESSAGES="en_US.ISO-8859-1"
LC_PAPER="en_US.ISO-8859-1"
LC_NAME="en_US.ISO-8859-1"
LC_ADDRESS="en_US.ISO-8859-1"
LC_TELEPHONE="en_US.ISO-8859-1"
LC_MEASUREMENT="en_US.ISO-8859-1"
LC_IDENTIFICATION="en_US.ISO-8859-1"
LC_ALL=
root@lucy /home/petr # locale -a
C
cs_CZ
cs_CZ.iso88592
cs_CZ.utf8
czech
en_US
en_US.iso88591
en_US.utf8
POSIX
root@lucy /home/petr # setxkbmap -print -query
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+us+cz(qwerty):2+inet(evdev)+group(ctrls_toggle)+capslock(swapescape)+compose(lwin)" };
xkb_geometry { include "pc(pc105)" };
};
rules: evdev
model: pc105
layout: us,cz
variant: ,qwerty
options: compose:lwin,caps:swapescape,grp:ctrls_toggle
root@lucy /home/petr # localectl list-locales
cs_CZ.UTF-8
en_US.UTF-8Last edited by Soptik (2020-07-23 21:09:46)
Offline
Do you have this problem only in a root terminal?
Why do you provide all that ouput as root?
It looks like you have the desired locale (CZ) but it isn't the default, currently used one?
Offline
No, the problem occurs everywhere. I used root terminal after I wasn't able to get output from `localectl` even with sudo. And the output is the same for localuser as well as for the root. But the issue is everywhere on every user account.
I think us locale should be the default, as I don't like mixing english and czech together.
Offline
Your locale is clearly broken (and the cause for what you see)
Not as root:
stat /etc/locale.conf
cat /etc/locale.confOnline
Thank you,
setting locale to en_US.UTF-8 fixed this issue.
Offline
^ Yes, any sort of ISO-8859-1 is probably discouraged nowadays.
I wasn't able to get output from `localectl` even with sudo.
This is very strange, it works for me with or without sudo.
Offline