Many of you probably heard about UTF-8 and tried to set it, but encountered a number of problems. In this tutorial we will try to show you how to set your locale to use UTF-8 encoding.
First of all, we edit /etc/sysconfig/i18n to look like that:
# If you feel brave, or don't ever plan to use text console # you can set locale to Unicode LANG=en_EN.UTF-8 # list of supported locales SUPPORTED_LOCALES="en en_EN.UTF-8/UTF-8 en_EN/ISO-8859-1"
Next, we have to set our console. We edit /etc/sysconfig/console we change:
#CONSOLEFONT=ter-v14n CONSOLESCREENFONTMAP=lat2u CONSOLEMAP=8859-1
to:
CONSOLEFONT=ter-v14n CONSOLESCREENFONTMAP= CONSOLEMAP=
Now we need to install: terminus-font-console . We use our all-time-favourite package manager - poldek :
poldek -i terminus-font-console
To make sure the man pages are correctly displayed we need to install glibc-localedb-all using almighty poldek:
poldek -i glibc-localedb-all
Next thing would be reboot to make sure all locale is correctly set, after that you should have working UTF-8 encoding in your beloved PLD.
Please note that not all programs are capable of using UTF-8 however. If you use some old program, chances are that it does not support this, fairly new, standard. This tutorial was designed for Th/Ti PLD. If you are using older PLD (for example 2.0 (Ac), which we strongly suggest to update to Th or Ti ) you will for sure have problems with man and mc. In order to fix this, you need to update to versions from Th (download from ftp.th.pld-linux.org).
If you use gnu screen, and it clearly does not want to cooperate with UTF-8, you will have to edit ~/.screenrc and add:
defutf8 on
Unfortunately this requires screen restart.
If you have working UTF-8 on your machine, but other encoding on a remote host, where you cannot change it, you need to edit ~/.profile and add:
LANG=en_EN.UTF-8 LC_ALL=en_EN.UTF-8 export LANG LC_ALL
And it should work just fine.
* convmv - program which you can use to change encoding of file and directory names. Below an example showing how to change ISO-8852-2 to UTF-8:
$ convmv --notest -f iso8859-2 -t utf8 żółw/
This tutorial is a translation of Polish one made by paszczus