Choosing India as location sets locale as en_IN and not en_IN.utf8

Bug #653259 reported by Vish
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libx11 (Ubuntu)
Invalid
Undecided
Unassigned
python-defaults (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: ubiquity

Not sure why this is different, but when the location is chosen as India during install the locale is set as en_IN rather than en_IN.utf8
This causes problems with gwibber > Bug 653225 [and maybe other applications which do not factor this.]

~$ locale
LANG=en_IN
LC_CTYPE="en_IN"
LC_NUMERIC="en_IN"
LC_TIME="en_IN"
LC_COLLATE="en_IN"
LC_MONETARY="en_IN"
LC_MESSAGES="en_IN"
LC_PAPER="en_IN"
LC_NAME="en_IN"
LC_ADDRESS="en_IN"
LC_TELEPHONE="en_IN"
LC_MEASUREMENT="en_IN"
LC_IDENTIFICATION="en_IN"
LC_ALL=

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: ubiquity (not installed)
Uname: Linux 2.6.35-02063504-generic i686
Architecture: i386
Date: Sat Oct 2 02:09:51 2010
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Alpha i386 (20100924)
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_IN
 SHELL=/bin/bash
SourcePackage: ubiquity

Revision history for this message
Vish (vish) wrote :
Revision history for this message
Arne Goetje (arnegoetje) wrote :

A lot of software expects the encoding to be specified in the locale code. Thererfore the installer really should always append .utf8 when a language-country combination doesn't have it. GDM and language-selector do this correctly, btw.

Revision history for this message
Colin Watson (cjwatson) wrote :

No, ubiquity is correct here - en_IN.UTF-8 wouldn't be a valid locale. Look at /usr/share/i18n/SUPPORTED which lists only en_IN.

Please open bugs on the applications that get this wrong. They must use nl_langinfo or a similar interface, and must not try to parse the locale name.

Changed in ubiquity (Ubuntu):
status: New → Invalid
Revision history for this message
Colin Watson (cjwatson) wrote :

(If we changed ubiquity, we would just hide the bugs in those applications, and users would run across them in different ways.)

Revision history for this message
Colin Watson (cjwatson) wrote :

For an example of an application that gets this right, see man-db. I put some effort into making sure it actually complied with locale specifications.

Revision history for this message
Ken VanDine (ken-vandine) wrote :

Moving this to python, since it seems to be broken in locale.setlocale

affects: ubiquity (Ubuntu) → python-defaults (Ubuntu)
Changed in python-defaults (Ubuntu):
status: Invalid → New
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Easy reproducer:

LANG=en_IN python lp-653259.py

You'll get an exception, "unsupported locale setting"

Revision history for this message
Matthias Klose (doko) wrote :

python gets this information from locale.alias, in the libx11-data package.

Revision history for this message
Matthias Klose (doko) wrote :

$ grep en_IN /usr/share/X11/locale/locale.alias
en_IN en_IN.ISO8859-1
en_IN: en_IN.ISO8859-1

Revision history for this message
dino99 (9d9) wrote :

This version has expired

Changed in python-defaults (Ubuntu):
status: New → Invalid
Changed in libx11 (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.