This arose because I recently have been seeing unexpected characters replacing box drawing characters in MC and various utility output, e.g. systemd-analyze critical-chain # set | grep LC_ | wc -m 1950 # set | grep LC_ makes what amounts to a lot of litter, apparently including few or no line feeds. On a vtty login: # 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= # In Plasma in XTerm or Konsole: # locale LANG=POSIX LC_CTYPE=POSIX 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= # 1-why the difference? 2-is there a "correct" set of values for someone who reads, writes and understands only English? 3-Do root's default values normally differ from other users? 4-what initializes the values? 5-what's an ideal or optimal way to deviate from any of the defaults: A: per user? B: globally? -- Evolution as taught in public schools is, like religion, based on faith, not based on science. Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata
The Arch Wiki page on 'locale' - https://wiki.archlinux.org/title/locale - seems to be very relevant here since it deals with systemd as well, and calls out where KDE Plasma looks for a file that can override locales once the desktop environment is loaded. Perhaps localectl set-locale en_US.UTF-8 may be a good starting point, along with going to your Plasma Region & Language settings and checking that they are set as you wish? I don't know if this is necessarily "correct" per se, but I have no issues with character display that I can tell, and here's my locale output: [username@hostname]:~> locale LANG=en_US.UTF-8 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= Sent with Proton Mail secure email. ------- Original Message ------- On Sunday, August 20th, 2023 at 9:17 PM, Felix Miata <mrmazda@earthlink.net> wrote:
This arose because I recently have been seeing unexpected characters replacing box drawing characters in MC and various utility output, e.g.
systemd-analyze critical-chain
# set | grep LC_ | wc -m 1950 # set | grep LC_ makes what amounts to a lot of litter, apparently including few or no line feeds.
On a vtty login: # 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= #
In Plasma in XTerm or Konsole: # locale LANG=POSIX LC_CTYPE=POSIX 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= #
1-why the difference?
2-is there a "correct" set of values for someone who reads, writes and understands only English?
3-Do root's default values normally differ from other users?
4-what initializes the values?
5-what's an ideal or optimal way to deviate from any of the defaults: A: per user? B: globally? -- Evolution as taught in public schools is, like religion, based on faith, not based on science.
Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!
Felix Miata
On Mon, Aug 21, 2023 at 4:22 AM Felix Miata <mrmazda@earthlink.net> wrote:
This arose because I recently have been seeing unexpected characters replacing box drawing characters in MC and various utility output, e.g.
systemd-analyze critical-chain
# set | grep LC_ | wc -m 1950 # set | grep LC_ makes what amounts to a lot of litter, apparently including few or no line feeds.
On a vtty login: # 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= #
In Plasma in XTerm or Konsole: # locale LANG=POSIX LC_CTYPE=POSIX 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= #
1-why the difference?
Because two shells were started using different code paths, used different startup files etc.
2-is there a "correct" set of values for someone who reads, writes and understands only English?
Any value for which translations are not available will result in built-in English messages (I believe I have seen one project that used non-English strings because the author was not native English speaker). So removing *-lang packages will also result in a mostly English system irrespective of used locale.
3-Do root's default values normally differ from other users?
Yes, it has been this way since I started to use SuSE.
4-what initializes the values?
It could be systemd, it could be shell startup scripts, it could be your desktop environment. It depends on how a given process is started exactly.
5-what's an ideal or optimal way to deviate from any of the defaults: A: per user?
Define "per user". For the login shell it is normally ~/.i18n but I suppose there are exotic shells which do not interpret it. Your desktop environment may override those values. Your display manager may use its own settings. And there is also a user systemd instance for which I am not sure. And there are cron jobs which are not run using login shells. So if "per user" means "process with your UID", there is no blanket answer.
B: globally?
Today it is /etc/locale.conf (which is what localectl or YaST edit).
On 2023-08-21 03:57, Andrei Borzenkov wrote:
On Mon, Aug 21, 2023 at 4:22 AM Felix Miata <mrmazda@earthlink.net> wrote:
...
3-Do root's default values normally differ from other users?
Yes, it has been this way since I started to use SuSE.
There are some root related vars in /etc/sysconfig/language. In this machine which was born using Leap 15.4, I have: ROOT_USES_LANG="ctype" resulting in: Laicolasse:~ # 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= Laicolasse:~ # systemd-analyze critical-chain is displaying box chars (in a terminal in xfce). Do you know what would be the caveats of using: ROOT_USES_LANG="en_US.UTF-8" ?
4-what initializes the values?
It could be systemd, it could be shell startup scripts, it could be your desktop environment. It depends on how a given process is started exactly.
5-what's an ideal or optimal way to deviate from any of the defaults: A: per user?
Define "per user". For the login shell it is normally ~/.i18n but I suppose there are exotic shells which do not interpret it. Your desktop environment may override those values. Your display manager may use its own settings. And there is also a user systemd instance for which I am not sure. And there are cron jobs which are not run using login shells. So if "per user" means "process with your UID", there is no blanket answer.
B: globally?
Today it is /etc/locale.conf (which is what localectl or YaST edit).
Ah, that's news to me :-) I have Laicolasse:~ # cat /etc/locale.conf LANG=en_US.UTF-8 Laicolasse:~ # -- Cheers / Saludos, Carlos E. R. (from openSUSE 15.5 (Laicolasse))
On 22.08.2023 15:27, Carlos E. R. wrote:
Laicolasse:~ # 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= Laicolasse:~ #
systemd-analyze critical-chain is displaying box chars (in a terminal in xfce).
I cannot reproduce it. I get expected pseudo-graphic. You need to provide more detailed steps how to reproduce it (starting with what "terminal" actually means).
On 2023-08-22 13:40, Andrei Borzenkov wrote:
On 22.08.2023 15:27, Carlos E. R. wrote:
Laicolasse:~ # 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= Laicolasse:~ #
systemd-analyze critical-chain is displaying box chars (in a terminal in xfce).
I cannot reproduce it. I get expected pseudo-graphic. You need to provide more detailed steps how to reproduce it (starting with what "terminal" actually means).
Sorry, I am not the one having the problem, I also get the pseudo-graphic, that's what I meant with "box characters". -- Cheers / Saludos, Carlos E. R. (from openSUSE 15.5 (Laicolasse))
Hello, Am Montag, 21. August 2023, 03:17:25 CEST schrieb Felix Miata:
3-Do root's default values normally differ from other users?
That depends on the settings in /etc/sysconfig/language, especially ROOT_USES_LANG. Your output looks like you could have it set to "ctype". Regards, Christian Boltz -- [Windows krepiert nach Update] > Habt Ihr eine Idee, was ich tun könnte? Vermutlich ein Computervirus. Besorg etwas Aciclovir aus der Apotheke, oeffne das Rechnergehaeuse und troepfle das Mittel auf alle roten oder geschwollenen Bauteile. [Mirko Liss]
participants (5)
-
Andrei Borzenkov
-
Carlos E. R.
-
Christian Boltz
-
Felix Miata
-
John Kizer