8 Replies Latest reply on Aug 25, 2018 9:03 AM by 2672202

    ja_JP.UTF-8 locale on desktop


      Trying Solaris 11.4 Beta Refresh 2 (July 2018).


      Outputs of date & ls -l are English (not Japanese) when LANG=ja_JP.UTF-8 on desktop.

      It is not my environment problem because zpool is in Japanese.


      On the other hand, Japanese output is got on console.

      (Saved the output and saw it on desktop.)


      Not all the commands are checked.


      - date

      - ls

      - zpool


      What is happening ?

        • 1. Re: ja_JP.UTF-8 locale on desktop

          Please post the output of the command




          cat $HOME/.cache/gdm/session.log

          • 2. Re: ja_JP.UTF-8 locale on desktop

            $ locale










            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

            • 3. Re: ja_JP.UTF-8 locale on desktop

              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.

              • 4. Re: ja_JP.UTF-8 locale on desktop

                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.

                • 5. Re: ja_JP.UTF-8 locale on desktop
                  Niveditha Rau-Oracle

                  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

                     export LC_TIME=$REGION

                     export LC_NUMERIC=$REGION

                     export LC_MONETARY=$REGION


                  After making the edit, you'd need to restart the session (logout)

                  • 6. Re: ja_JP.UTF-8 locale on desktop

                    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


                    % locale









                    % /usr/bin/gnome-terminal

                    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.)

                    • 7. Re: ja_JP.UTF-8 locale on desktop

                      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.

                      • 8. Re: ja_JP.UTF-8 locale on desktop

                        Thank you Alan,


                        I may have to consider what to do with some old softwares which assume non-UTF-8 locale (such as EUC).