Locales broken after updating from 9.10 to 10.4

Asked by asala

I updated from 9.10 to 10.4 (both 64 bit) in a computer with spanish and catalan locales installed.
After finishing the upgrade, the locale settings were a mess.
Everything was in English, and gnome-language-selector hanged (it dissapeared).
Don't remember exactly what I did but
After playing with locale, export LANG and LANGUAGE and dpkg-reconfigure locale from some recipes on the web,
miraculously gnome-language-selector accepted to run, setting LC_ALL to "C".
Installing additional language packs seemed to work but, anyway, restarting the computer wouldn't solve the problem:
everything is in English, even if I chose a different language on the startup screen.
It seems that some issue with utf8 and non-utf-8 locales is buggy, in the sense that LANG refers to an UTF8 encoding, LANGUAGE refers to non-utf-8 ones and the non-utf-8 haven't been actually generated (not in /usr/lib/locale). Anyway, LANG and LANGUAGE are not identical.
I don't know which package to file the bug against (it's my first time here and I'm just an user, not a developer) because it occurred during the distribution upgrade... there were warnings on locales while updating packages on the terminal window.

Just sent this to see If there are other people with the same problem (couldn't find it on the bug list)...

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
A.Ilusin
Solved:
Last query:
Last reply:
Revision history for this message
asala (asala) said :
#1

In a 32-bit laptop ubgraded from 9.10 to 10.4 the same happened... perl errors during installation.

Partially solved by
setting LC_ALL="es-ES.utf8" in /etc/default/locale
also in /etc/environment
and later
cd /usr/lib/locale
sudo mv locale locale_orig
sudo dpkg-reconfigure locales
now the computer is in Spanish.
Seems a bug in some installation script (claims LC_ALL=(unset) ) or either the locales format in /usr/lib/locale have changed and the upgrade script doesn't change...
I say partially solved because an "unspecified" language appears at gdm login screen in addition to Spanish and, anyway, installing additional languages doesn't seem to work (I just tested that on the desktop. I wanted Spanish and Catalan accounts).

Revision history for this message
Best A.Ilusin (a-ai) said :
#2

I had a similar problem with ru_UA.UTF-8 locale. When the Russian language has been installed, but the country Ukraine. Same program as xterm, wine and etc. not accept keyboard input. xterm warn that locale not suported XLib, but in version 9.10 it worked perfectly. After installing a manual Sinaptic language-pack-uk and language-pack-gnome-uk (uk - for Ukraine) all program began work fine.
Maybe this will help and you. :)

Revision history for this message
asala (asala) said :
#3

My language packs were already there in Synaptic.
When I somehow solved the issue by editing the LANG and LANGUAGE variables in /etc/environment, an automatic update install of a new version of language packs again changed everything to English.

Finally, my problem was solved by renaming /usr/lib/locale to /usr/lib/locale_old and doing sudo dpkg-reconfigure locales which created a new locale directory, because the old one seemed corrupt. Then, I reverted the /etc/environment and /etc/default/locale files to what they were on a bug-less netbook and things seem to work ok.

I raised the question because this type of bug seems to be around quite a long ago (google finds references to corrupt locales and dpkg-reconfigure locales in ubuntu back in 2007) and it is strange it has not been fully solved.
I own 4 computers with ubuntu and, two of them the upgrade went fine and in other two I had the locale mess. Who knows why...
For a "novice" user, gnome-language-selector crashing and having to resort to sudo dpkg-reconfigure stuff isn't that friendly.

Thanks, A.Ilusin.