Home arrow Debian arrow Remove UTF8 Support in Debian and Ubuntu Linux
Remove UTF8 Support in Debian and Ubuntu Linux PDF  
Digg Reddit Stumble Upon Facebook Twitter Google Technorati Bookmark
Sunday, 14 March 2010

Sometimes we don't want/need UTF8 support for our Linux terminal. In default Debian and Ubuntu installation UTF8 support is enabled. One example where we did not want UTF8 support is if we use a terminal app that does not support UTF8. For example in Debian Lenny we don't have by default Midnight Commander with UTF8 support but we have terminal with UTF8 support enabled.

Step 1. We check if we have UTF8 configured for our terminal
-------------------------------------------------------------------------------------
To see if you have enabled UTF8 in console:
echo $LANG

If we have, then we will get:
en_US.UTF-8

If we don't get the previous line (or another language but with UTF-8 at the end) then it means we don't have UTF8 support in our terminal. In that case there's no point to disable something that is not configured.


Step 2.  We change some settings so our terminal will not use UTF8
---------------------------------------------------------------------------------------------
Edit /etc/environment:

    nano /etc/environment


and add/change LANG variable to LANG="en_US"

Edit /etc/default/locale

    nano /etc/default/locale

and do the same change: LANG="en_US"


Step 3_a): This is only for Debian: create a new locale
--------------------------------------------------------------------------
Install debconf:

   apt-get install debconf


Edit /etc/locale.gen file:

   nano /etc/locale.gen


there we add:
en_US ISO-8859-1

after that we run:
    locale-gen

We log off and reconnect and voila, we have the terminal without UTF-8 support.


Step 3_b): This is only for Ubuntu: create a new locale
---------------------------------------------------------------------------
We edit: /var/lib/locales/supported.d/local

    nano /var/lib/locales/supported.d/local

we add the following:
en_US ISO-8859-1

Then we run:
    locale-gen

We log off and reconnect and voila, we have the terminal without UTF-8 support.

That's all.

Last Updated ( Sunday, 14 March 2010 )
 
Next >

Misc

Linux Tips

Polls

What is your favorite Linux Distribution ? (we just added Mint and reset the pool data)