How to set the correct locale on Solaris
Due to bad localization, some keys could produce no effect or print a question mark, instead of the expected symbol in a terminal window running in an NX session on a Solaris box.
This has been observed especially for non-ASCII characters, e.g. the "pound" (£) symbol, and can even occur when the correct keyboard layout is set.
To fix this issue:
1.
Run the command "locale" to check the current settings.
If locale is set to "C", non-ASCII characters don't work in many applications.
2.
Run the command "locale -a" to list the available locales.
3.
If the needed locale is not available, it is possible to install it from the Solaris installation disks by the command "localeadm". For example, if you need the en_GB (English for UK) locale, mount the Solars CD and run:
localeadm -a en_GB -m -d /cdrom/cdrom0
The option "-m" will prevent you from installing translated desktop messages. Remove it if you wish.
4.
Set the LANG variable in the user's shell custom init script (.profile or .bashrc or .kshrc) depending on the shell in use. For example, for shell "sh" change .profile to add these lines:
LANG="en_GB"
export LANG
If the shell in the user's profile is csh, change .cshrc to add this line:
setenv LANG en_GB
