Gnome-terminal/System as UTF-8?

Asked by Tiago Silva

I recently (re)installed Ubuntu Drapper Drake, but, instead of installing in Portuguese, I've installed the 'C' locale.

I did this because in one previous installion, I installed US English, as my language, then Portugal as my country.
When I tried to update, lots of installs got broken due to the system. It set my locale as *en-pt* or *us-pt*... which doesn't exists/makes sense!

So, now I decided to do what I typed first, but I noticed that virtually everything, including the terminal is marked as 'ANSI_X3.4-1968'.

How the hell do I set my entire system as UTF-8?

Thanks in advance.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Florian Hackenberger
Solved:
Last query:
Last reply:
Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) said :
#1

Open a terminal - Applications --> Accessories --> Terminal and type the following command:-

sudo dpkg-reconfigure locales

It should prompt you for all the locales you want generated and which should be the default. Once done, logout and back in. Use the "locale" command in a terminal to see what locale you are currently using. Here is a sample:-

alan@wopr:~$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Revision history for this message
Tiago Silva (tiagosilva) said :
#2

Hi Alan.

Thanks for your input... but it didn't worked:

tiago@magi:~$ sudo dpkg-reconfigure locales
Current default timezone: 'Europe/Lisbon'.
Local time is now: Wed Feb 7 12:34:23 WET 2007.
Universal Time is now: Wed Feb 7 12:34:23 UTC 2007.
Run 'tzconfig' if you wish to change it.

That's pretty much all it does.

Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) said :
#3

Hmm, that's odd, sorry about that. It does different things on Debian and Ubuntu.

Pop up a terminal and try this:-

sudo apt-get install localeconf

if you ever need to reconfigure it

sudo dpkg-reconfigure localeconf

I got that from the following page:-

https://help.ubuntu.com/community/LocaleConf

(I should have looked there first :) )

Revision history for this message
Tiago Silva (tiagosilva) said :
#4

The terminal is still at ANSI.

tiago@magi:~$ sudo apt-get install localeconf
Reading package lists... Done
Building dependency tree... Done
localeconf is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

tiago@magi:~$ sudo dpkg-reconfigure localeconf
#this is where I signal everything to en-US.UTF.8

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or director y
/usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or direc tory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory

tiago@magi:~$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Revision history for this message
Best Florian Hackenberger (f-hackenberger) said :
#5

It appears that you are missing some generated files.
Maybe the following commands fix your problem:
sudo apt-get install language-pack-en
sudo locale-gen en_US.UTF-8
This is from http://juicebar.wordpress.com/tag/linux/ubuntu-606/

Revision history for this message
Tiago Silva (tiagosilva) said :
#6

User confirmed that the request is solved.

Revision history for this message
Tiago Silva (tiagosilva) said :
#7

Sorry for the late reply, I've been away.

Apparently it seems to be fixed but still... it's a pretty catchy situation, that I would like to be address in the future.

My sincere thanks to everyone who helped me.

Revision history for this message
Florian Hackenberger (f-hackenberger) said :
#8

You'r welcome! There should be a Gnome application which helps you installing new languages. This should be used to install the needed files before changing the language.

Revision history for this message
Tiago Silva (tiagosilva) said :
#9

There is, fhackenberger.

I decided to try this on Edgy:

Installation:
 Language = C
 Country = Portugal

After the installation: System -> Administration -> Language Support
* Check the support for English.
* Set the default language as English (United States of America).
* Restarted GNOME.
* Profit.

But this is incredibly moronic.
All I want is to install an basic English (C, to me, implies a non-specific base of English, locale) with UTF-8, based in Portugal, but if you l look at my first query, it seems to be impossible to do this via a direct approach. *grumble*