How do i learn default system encoding of a solaris zone?

saban picture saban · Mar 5, 2012 · Viewed 9.2k times · Source

In a solaris zone, i want to learn default system charset and collation in the terminal.
I searched on google a bit, but i couldn't find.
I used locale command, but it gives me all settings and it is not what i need.
Btw, i want to learn this in the terminal, because i only have ssh connection to that zone.
Thx in advance.

Answer

jlliagre picture jlliagre · Mar 5, 2012

The default locale is just this, a default value. It can be set in /etc/default/init. If not set there, the C locale is used. Shell initialization files (eg: /etc/profile, ~/.bash_profile and the likes) are free to override the default with a different value. Either one or both of you and your friend are doing that.

If you want your application to use a specific locale and character encoding instead of the current one, just set it before launching your application.

eg:

$ LC_ALL=en_US.UTF-8 myApplication