Mailinglist Archive: opensuse-support (116 mails)

< Previous Next >
Re: [opensuse-support] "bad" locale -> bad/no box characters
Andrei Borzenkov composed on 2018-12-26 19:22 (UTC+0300):

Felix Miata composed:

These are from 42.3 installations. On both, /etc/sysconfig/language is
identical,
and 'DroidSansMono.ttf: "Droid Sans Mono" "Regular"' results from 'fc-match
monospace'.
These show good vs. bad box drawing characters in Konsole3:
Good: http://fm.no-ip.com/SS/Suse/lc423goodP5BSE.jpg
Bad http://fm.no-ip.com/SS/Suse/lc423bad00srv.jpg

Konsole treats program output as non-UTF-8

Locale on the good host, all POSIX except CTYPE and ALL, same in Konsole3 as
in XTerm:
# locale
LANG=POSIX
LC_CTYPE=en_US.UTF-8
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

On the bad host, all en_US.UTF-8 except LANG, and XTerm is OK, but Konsole
is not:
(# locale)
LANG=POSIX
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8

Locale in shell session is irrelevant. What is relevant, is locale in
which konsole was started and which determines how input is interpreted.
Unforutnately I do not know any good way to find it out. You may try
something like

tr '\0' '\n' < /proc/${PID_OF_KONSOLE}/environ

# ps -A | grep -i sole
1737 ? 00:00:55 konsole
1740 ? 00:00:20 konsole
# tr '\0' '\n' < /proc/${PID_OF_KONSOLE}/environ
-bash: /proc//environ: No such file or directory
# tr '\0' '\n' < /proc/${1740}/environ
-bash: /proc//environ: No such file or directory
# tr '\0' '\n' < /proc/1740/environ | wc -l
82
# tr '\0' '\n' < /proc/1740/environ | egrep 'LC_|LOCALE|LANG|locale'
LANG=en_US
G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-15,CP1252
LC_TIME=en_DK

but I won't be surprised if KDE takes this information from somewhere
else. When I was using KDE I could not find any way to launch specific
KDE application in specific locale without changing global use settings.

The difference between good and bad has root in .bashrc:

export LC_ALL=en_US.UTF-8

The question is, why does Xterm get box characters right, but Konsole not.
Bug?
--
Evolution as taught in public schools is religion, not science.

Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata *** http://fm.no-ip.com/
--
To unsubscribe, e-mail: opensuse-support+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-support+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups