Most Linux distributions are by default shipped with UTF-8 encoded locale nowadays. Unless the user makes an active choice during the installation english locale is the default choice. In Debian Etch it's american english, en_US.UTF-8. For my concern I use swedish as locale, hence I use the locale sv_SE.UTF-8. However, even if the encoding in the system is correct UTF-8-encoded files show up like gibberish in the console when trying to display "exotic" characters. What is needed is another font to display the content.
The by far easiest way to come to grips with the problem is to install the package console-setup:
aptitude install console-setup
Then configure the console by:
dpkg-reconfigure console-setup
1. Choosing keyboard.
2. Choosing keyboard origin
3. Choosing keyboard layout
4. Choosing modifier keys
5. Choosing compose key
6. Choosing encoding, need I say that it should be UTF-8?
7. Time to choose the character set to use for the console. Choose one that combines the right character set that you need.
8. As stated in the dialog above Fixed font has better international support, so I choose that.
9. Select prefered font-size.
If you are using Putty you need to configure it to display UTF-8.
Under the translation choose UTF-8 in the drop down menu.
The result:
You can check your own console by using an UTF-8 encoded file. Markus Kuhn offers one that is good for testing.
wget http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt less UTF-8-demo.txt
Not all characters can be displayed but it is a lot better than the default configuration.
Comments
Post new comment