0010-set-language.patch forces UTF-8 into use in ~/.pam_environment

Bug #1033698 reported by Teemu Toivola
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
accountsservice (Ubuntu)
Expired
Low
Unassigned

Bug Description

The modification done by 0010-set-language.patch (see LP: #866062) cause UTF-8 to be forced in ~/.pam_environment even if something else has been defined in /etc/default/locale.

Example:
/etc/default/locale contains:
LANG="en_US"

After login from lightdm ~/.pam_environment contains:
LANG=en_US.UTF-8

and that result in UTF-8 being forced to use for example in terminals.

This problem can be traced to 0010-set-language.patch that introduces the function "user_locale_utf8_fix" that for some reason gets called every time variables are handled. As a result, it's not possible to have UTF-8 disabled.

As a very crude hack, I've modified the /usr/share/language-tools/save-to-pam-env script to call sed and remove any UTF-8 string before the exit line.

Version information:
Xubuntu 12.04
accountsservice:
  Installed: 0.6.15-2ubuntu9.2
  Candidate: 0.6.15-2ubuntu9.2
  Version table:
 *** 0.6.15-2ubuntu9.2 0
        500 http://fi.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     0.6.15-2ubuntu9.1 0
        500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
     0.6.15-2ubuntu9 0
        500 http://fi.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report, setting Low priority there are very few reasons to not use UTF8 nowadays

Changed in accountsservice (Ubuntu):
importance: Undecided → Low
marek keram (makory1)
Changed in accountsservice (Ubuntu):
status: New → Fix Committed
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Teemu,
While I think you are right about the Ubuntu UIs generally don't support non-UTF-8 locales, it seems not to be because of the user_locale_utf8_fix() function in 0010-set-language.patch. user_locale_utf8_fix() does not convert UTF-8 locale names to non-UTF-8 names; it just replaces .utf8 with .UTF-8 to not reintroduce bug 666565.

Personally I think that in order to make Ubuntu support non-UTF-8 locales would need rather extensive changes in a bunch of packages. If that's what you want, discussing it on e.g. ubuntu-devel-discuss is probably a good idea.

Changed in accountsservice (Ubuntu):
status: Fix Committed → New
Changed in accountsservice (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for accountsservice (Ubuntu) because there has been no activity for 60 days.]

Changed in accountsservice (Ubuntu):
status: Incomplete → Expired
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.