FS#26525 - [initscripts] broken display in ncurses, pacman
Attached to Project:
Arch Linux
Opened by Link Mauve (linkmauve) - Wednesday, 19 October 2011, 16:42 GMT
Last edited by Tom Gundersen (tomegun) - Wednesday, 09 November 2011, 00:56 GMT
Opened by Link Mauve (linkmauve) - Wednesday, 19 October 2011, 16:42 GMT
Last edited by Tom Gundersen (tomegun) - Wednesday, 09 November 2011, 00:56 GMT
|
Details
Description:
Since yesterday, every ncurses programs, pacman, and probably other console programs have their display broken in tmux. Additional info: * package version(s) tmux 1.5-1 ncurses 5.9-1 [testing] enabled. Steps to reproduce: - launch tmux; - launch any ncurses program in it, mutt, poezio, ncmpcpp, etc.; - admire the visual glitches. |
This task depends upon
Closed by Tom Gundersen (tomegun)
Wednesday, 09 November 2011, 00:56 GMT
Reason for closing: Fixed
Additional comments about closing: This is fixed in the newest initscripts in [testing].
Wednesday, 09 November 2011, 00:56 GMT
Reason for closing: Fixed
Additional comments about closing: This is fixed in the newest initscripts in [testing].
Which terminal emulator do you use? I use lxterminal on x86_64.
community/lxterminal 0.1.11-1
community/tmux 1.5-1
core/ncurses 5.9-1
It seems to be related to UTF-8 handling, because when I launch tmux with LANG=C it works.
% locale
LANG=fr_FR.UTF-8
LC_CTYPE=
LC_NUMERIC=
LC_TIME=
LC_COLLATE=
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES=
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=
The problem seems to be with the size tmux attributes to each character. C-l gets it mostly right, but switching windows triggers some of the issues.
Attachments:
- wrongsize.png: I typed "éééééééééééééééééééééééééééé" and then…
- after.png: the output was like in wrongsize.png, but then I went to the previous window and switched again to the next window
- vimchaos.png: basically, the accentuated characters in the left buffer take too much space when switching panes, causing the broken display (C-l puts it back nicely until I switch windows again).
after.png (0.3 KiB)
vimchaos.png (47.7 KiB)
Edit: reported
LC_ALL and/or LC_CTYPE should not be set to empty (''), but to a UTF-8 locale, or unset completely.
Does it work for you if you make sure both LC_ALL and LC_CTYPE are set?
It's extremely fishy that LC_MESSAGES and the like aren't filled in your `locale' output. However, it should be noted that LC_ALL should _never_ be set. It's meant for debugging as a temporary override -- not for normal usage.
This is a ZSH issue with the new locale.sh. Unlike bash, ZSH will export an unset variable (with no value).
$ export FOO
$ declare -p FOO
-bash: declare: FOO: not found
% export FOO
% declare -p FOO
typeset -x FOO=''
Could you check if replacing /etc/profile.d/locale.sh with this: <https://raw.github.com/teg/initscripts-arch/master/locale.sh> fixes the problem?
------
if [ -n "$LC_TELEPHONE" ]; then
export LC_MEASUREMENT
else
unset LC_MEASUREMENT
fi
------
I'm not a locale expert, but are you sure that's correct?