Please post the output of the command
Ahh, this is the reason.
After setting LC_ALL to ja_JP.UTF-8, got correct result of "date" & "ls -l" in Japanese,
although it is strange I made no change from 126.96.36.199.0.
Seems to be caused because
LC_NUMERIC, LC_TIME and LC_MONETARY are set individually on desktop,
which are not set on console.
(might be when LANG is not set or LANG=C ?, I'm not sure.)
Is this a new feature of 11.4 ?
May be changed on 11.4 Beta Refresh 2 (July 2018).
I'm afraid this may cause troubles.
(1) different behavior between console & desktop.
(2) backward compatibility.
This is not something we'd intended to do from the Solaris side, but it appears it has to do with how the upstream GNOME 3 release sets those separately from the "Formats" setting in the Region & Language panel independently from the "Language" setting. It looks like that is not being set properly in our release and we'll need to investigate to find out why that is - it could be a design decision, a bug, or a dependency on something missing in Solaris such as systemd.
We had patched gnome-session to ensure we started in a UTF-8 locale to make sure gnome-terminal came up (since it now expects a UTF-8 locale). These changes are in /usr/bin/gnome-session. Does making the change below work in ensuring everything is set to the selected locale if REGION is empty?
-if [ -n "$REGION" ]; then
+if [ -z "$REGION" ]; then
After making the edit, you'd need to restart the session (logout)
Your patch seems to solve the problem, as long as I checked.
If gnome-terminal is the only reason why to do this, I would
(1) move /usr/bin/gnome-terminal to /usr/bin/gnome-terminal-
(2) write a script /usr/bin/gnome-terminal in which set locale, and then call /usr/bin/gnome-terminal-
This has less side effects.
But, it may not work.
gnome-terminal can be executed on C locale, such as
% uname -v
In this case, gnome-terminal is woke up on C locale.
But can not, from GUI (Activities / Terminal)
Not easy to understand the fundamental origin.
(Might be a gnome-3 issue, but not Solaris.)
Thanks for the suggestion, but it's not just gnome-terminal - GNOME 3 in general does not support non-UTF-8 locales. It's just that gnome-terminal checks the locale and refuses to start, while other applications do not. Also, due to gnome-terminal's client/server model, the locale used when running the gnome-terminal command does not matter, as it's just connecting to a server to ask it to open a new terminal, and that server is the one that has to be started in a UTF-8 locale.
Thank you Alan,
I may have to consider what to do with some old softwares which assume non-UTF-8 locale (such as EUC).