Doesn't recognize locale properly

Bug #1410676 reported by Uqbar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
New
Undecided
Unassigned

Bug Description

My current locale settings are:
LANG="en_US.UTF-8"
LC_NUMERIC="it_IT.UTF-8"
LC_TIME="it_IT.UTF-8"
LC_MONETARY="it_IT.UTF-8"
LC_PAPER="it_IT.UTF-8"
LC_NAME="it_IT.UTF-8"
LC_ADDRESS="it_IT.UTF-8"
LC_TELEPHONE="it_IT.UTF-8"
LC_MEASUREMENT="it_IT.UTF-8"
LC_IDENTIFICATION="it_IT.UTF-8"

as defined in /etc/default/locale and

LC_COLLATE="C"

in my ~/.bashrc

That is: I need all messages in Englishwhile using local (Italian) cenventions for numbers, time etc and use "C" collation.
Everytime I run apt-get I get this error message:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en",
        LC_ALL = (unset),
        LC_TIME = "en_IT.UTF-8",
        LC_MONETARY = "en_IT.UTF-8",
        LC_COLLATE = "C",
        LC_ADDRESS = "en_IT.UTF-8",
        LC_TELEPHONE = "en_IT.UTF-8",
        LC_NAME = "en_IT.UTF-8",
        LC_MEASUREMENT = "en_IT.UTF-8",
        LC_IDENTIFICATION = "en_IT.UTF-8",
        LC_NUMERIC = "en_IT.UTF-8",
        LC_PAPER = "en_IT.UTF-8",
        LANG = "en_IT.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

As you can see, the locale is recognized improperly as "en_IT" instead of "it_IT".
I would expect no such mangling.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: apt 1.0.1ubuntu2.6
ProcVersionSignature: Ubuntu 3.13.0-44.73-lowlatency 3.13.11-ckt12
Uname: Linux 3.13.0-44-lowlatency x86_64
ApportVersion: 2.14.1-0ubuntu3.6
Architecture: amd64
Date: Wed Jan 14 08:46:47 2015
InstallationDate: Installed on 2015-01-12 (1 days ago)
InstallationMedia: Kubuntu 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140722.2)
SourcePackage: apt
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Uqbar (uqbar) wrote :
Revision history for this message
Uqbar (uqbar) wrote :

The problem is getting worse now.
My /home filesystems has historically been formatted with XFS and I've been using UTF8 encoding since long now.
A few files there sport non-ASCII characters in the name, mainly a few accented vowels from my home language (Italian).
I have recently reinstalled the whole system (XFS+UTF8) and have restored the /home contents from a straight backup (another XFS+UTF8 file system) with "cp -a" command.
Everything seemed to work fine until I run a simple "ls -l" in a directory containing one of those files.
That name gets displayed with "??" instead of the accented vowels.
A software referring to another of those files says it cannot access it any more.
The bash doesn't allow me to enter those accented vowels any more.
I think the "locales" systems is behaving badly.

Revision history for this message
Uqbar (uqbar) wrote :

The actual values for those environment variables are the same as reported by apt:

$LC_ADDRESS = en_IT.UTF-8
$LC_COLLATE = C
$LC_IDENTIFICATION = en_IT.UTF-8
$LC_MEASUREMENT = en_IT.UTF-8
$LC_MONETARY = en_IT.UTF-8
$LC_NAME = en_IT.UTF-8
$LC_NUMERIC = en_IT.UTF-8
$LC_PAPER = en_IT.UTF-8
$LC_TELEPHONE = en_IT.UTF-8
$LC_TIME = en_IT.UTF-8

Revision history for this message
Uqbar (uqbar) wrote :

man -k locales
man: can't set the locale; make sure $LC_* and $LANG are correct

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.