FreeBSD Tips and Tricks

Next: Email Problems UP: TOC

For some tasks national language support for the keyboard is required. As an example tasks we'd like to update our database with special characters such as é, è, ö, à.

Let's enter the command locale in order to see the current settings:

locale
LANG= LC_CTYPE="C" LC_COLLATE="C" LC_TIME="C" LC_NUMERIC="C" LC_MONETARY="C" LC_MESSAGES="C" LC_ALL=

To see what languages are available we enter locale -a |more

locale -a |more
C POSIX af_ZA.ISO8859-1 af_ZA.ISO8859-15 af_ZA.UTF-8 am_ET.UTF-8 be_BY.CP1131 be_BY.CP1251 be_BY.ISO8859-5 be_BY.UTF-8 bg_BG.CP1251 bg_BG.UTF-8 ca_AD.ISO8859-1 ca_AD.ISO8859-15 ca_AD.UTF-8 ca_ES.ISO8859-1 ca_ES.ISO8859-15 ca_ES.UTF-8 ca_FR.ISO8859-1 ca_FR.ISO8859-15 ca_FR.UTF-8 ca_IT.ISO8859-1 ca_IT.ISO8859-15 ca_IT.UTF-8 cs_CZ.ISO8859-2 cs_CZ.UTF-8 da_DK.ISO8859-1 da_DK.ISO8859-15 da_DK.UTF-8 de_AT.ISO8859-1 de_AT.ISO8859-15 de_AT.UTF-8 de_CH.ISO8859-1 de_CH.ISO8859-15 de_CH.UTF-8 de_DE.ISO8859-1 de_DE.ISO8859-15 de_DE.UTF-8 el_GR.ISO8859-7 el_GR.UTF-8 en_AU.ISO8859-1 en_AU.ISO8859-15 en_AU.US-ASCII en_AU.UTF-8 en_CA.ISO8859-1 en_CA.ISO8859-15 en_CA.US-ASCII en_CA.UTF-8

To change the keyboard layout to Switzerland and use UTF-8

setenv LANG de_CH.UTF-8 
setenv MM_CHARSET UTF-8
Next: Email Problems UP: TOC