Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have the following locale settings when I type export:

declare -x LANG="es_ES.ISO-8859-1"
declare -x LANGUAGE="es:en"
declare -x LC_ADDRESS="ms_MY.UTF-8"
declare -x LC_IDENTIFICATION="ms_MY.UTF-8"
declare -x LC_MEASUREMENT="ms_MY.UTF-8"
declare -x LC_MONETARY="ms_MY.UTF-8"
declare -x LC_NAME="ms_MY.UTF-8"
declare -x LC_NUMERIC="ms_MY.UTF-8"
declare -x LC_PAPER="ms_MY.UTF-8"
declare -x LC_TELEPHONE="ms_MY.UTF-8"
declare -x LC_TIME="ms_MY.UTF-8"

I am Spanish living in Malaysia, so I actually want my system in Spanish but with the country setup for Malaysia. I actually don't know whether I have set it up right or not.

Now, I try to launch a recently installed application, git-gui (amongst some others), and I just get the following error message:

$ git-gui
We are sorry, command-not-found failed! Please send a bug report at:
https://bugs.launchpad.net/command-not-found/+filebug
Please attach the following info to the report:

command-not-found version: 0.3
Python version: 3.3.1 final 0
Distributor ID: Ubuntu
Description:    Ubuntu 13.04
Release:        13.04
Codename:       raring
Exception information:

unsupported locale setting
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/CommandNotFound/util.py", line 24 in crash_guard
    callback()
File "/usr/lib/command-not-found", line 69, in main
    enable_i18n()
File "/usr/lib/command-not-found", line 40, in enable_i18n
    locale.setlocale(locale.LC_ALL, '')
File "/usr/lib/python3.3/locale.py", line 541, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

So how can I fix my locales? What would be the right setup for my system to match my requirements and also the requirements of applications such as git-gui?

share|improve this question
    
To make it easier to help you, can you please add the output of the command locale -a –  Gunnar Hjalmarsson Oct 4 '13 at 5:03
    
$ locale -a C C.UTF-8 en_AG en_AG.utf8 en_AU.utf8 en_BW.utf8 en_CA.utf8 en_DK.utf8 en_GB.utf8 en_HK.utf8 en_IE.utf8 en_IN en_IN.utf8 en_NG en_NG.utf8 en_NZ.utf8 en_PH.utf8 en_SG.utf8 en_US.utf8 en_ZA.utf8 en_ZM en_ZM.utf8 en_ZW.utf8 es_AR.utf8 es_BO.utf8 es_CL.utf8 es_CO.utf8 es_CR.utf8 es_DO.utf8 es_EC.utf8 es_ES.utf8 es_GT.utf8 es_HN.utf8 es_MX.utf8 es_NI.utf8 es_PA.utf8 es_PE.utf8 es_PR.utf8 es_PY.utf8 es_SV.utf8 es_US.utf8 es_UY.utf8 es_VE.utf8 ms_MY.utf8 POSIX –  Jago Oct 5 '13 at 6:01
add comment

1 Answer

There is no latin1 locale generated on your system, but still you have assigned LANG such a locale name. You should edit /etc/default/locale. I suppose that it - for some reason - contains the line

LANG=es_ES.ISO-8859-1

Change that line to

LANG=es_ES.UTF-8

and reboot.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.