Bug 18539 - setlocale: LC_COLLATE: cannot change locale (en_BE.UTF-8)
Summary: setlocale: LC_COLLATE: cannot change locale (en_BE.UTF-8)
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Thomas Backlund
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-25 10:46 CEST by Chris Denice
Modified: 2016-06-02 19:59 CEST (History)
3 users (show)

See Also:
Source RPM: locales-2.22-4.mga6.src.rpm
CVE:
Status comment:


Attachments
re-enable en_BE (1.21 KB, patch)
2016-06-02 15:32 CEST, Thierry Vignaud
Details | Diff

Description Chris Denice 2016-05-25 10:46:14 CEST
Description of problem:

In a recent update on Cauldron, my locales are not longer found:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_BE.UTF-8:en_US:en",
        LC_ALL = (unset),
        LC_SOURCED = "1",
        LANG = "en_BE.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C")


although they seem to be installed:

rpm -q locales-be locales-en locales-fr
locales-be-2.22-4.mga6
locales-en-2.22-4.mga6
locales-fr-2.22-4.mga6

Using the control center, if I select language English(US), Belgium is not in the list of proposed country and I have to select "other country" to find it. After doing that, no additional locales are installed suggesting I got the right packages. If I play with the control center, and select language English, country France, then I do not get any error, but if I switch back with language English and country Belgium, the above error message shows up again.

Reminiscent with:
https://bugs.mageia.org/show_bug.cgi?id=3723

Cheers.
Comment 1 Marja Van Waes 2016-05-25 22:27:58 CEST
Assigning to all packagers collectively, since there is no maintainer for this package.

And CC'ing Martin, since he fixed a similar issue before

CC: (none) => mageia, marja11
Assignee: bugsquad => pkg-bugs

Comment 2 Martin Whitaker 2016-06-01 21:52:29 CEST
After a bit of investigation:

1) The locale identifier consists of two lower case letters identifying a language and two upper case letters identifying a country. Just to confuse you, different two-letter codes are used for each, so "be" identifies the Belarussian language, but "BE" identifies the country Belgium.

2) Each locales package covers all the countries associated with one language. So locales-be is for the Belarussian language. If you want your language to be English and your country to be Belgium, you should just need the locales-en package to be installed.

3) Belgium has been removed from the countries supported in the locales-en package. This doesn't appear to be that recent - the change log entry is

* Sun Aug 16 2015 tv <tv> 2.22-0.6.mga6
+ Revision: 865093
- bump release
- ignore en_BE since it'is disabled
Comment 3 Chris Denice 2016-06-02 11:36:13 CEST
An user could select any language he fancies + selecting any location he lives. All combinations should be allowed.

English people can actually live in Belgium, even though English is not an official language :) I have not done more than that in drakconf, selecting my language and picking up the country I live. So if this triggers a LOCALE error, then something is still bugged in the way localization are set.

cheers.
Comment 4 Marja Van Waes 2016-06-02 14:56:31 CEST
(In reply to Martin Whitaker from comment #2)
> After a bit of investigation:
> 
> 1) The locale identifier consists of two lower case letters identifying a
> language and two upper case letters identifying a country. Just to confuse
> you, different two-letter codes are used for each, so "be" identifies the
> Belarussian language, but "BE" identifies the country Belgium.
> 
> 2) Each locales package covers all the countries associated with one
> language. So locales-be is for the Belarussian language. If you want your
> language to be English and your country to be Belgium, you should just need
> the locales-en package to be installed.
> 
> 3) Belgium has been removed from the countries supported in the locales-en
> package. This doesn't appear to be that recent - the change log entry is
> 
> * Sun Aug 16 2015 tv <tv> 2.22-0.6.mga6
> + Revision: 865093
> - bump release
> - ignore en_BE since it'is disabled

Thanks, Martin,

re-assigning to tv :-)

Assignee: pkg-bugs => thierry.vignaud

Comment 5 Marja Van Waes 2016-06-02 15:00:59 CEST
(In reply to Chris Denice from comment #3)
> An user could select any language he fancies + selecting any location he
> lives. All combinations should be allowed.
> 
> English people can actually live in Belgium, even though English is not an
> official language :) I have not done more than that in drakconf, selecting
> my language and picking up the country I live. So if this triggers a LOCALE
> error, then something is still bugged in the way localization are set.
> 
> cheers.

In my English only installs i've never seen "en_NL", only "en_GB" and I don't have your problem, while my timezone etc. are all set to Amsterdam/nl. The problem might be that it is still possible for you to set "en_BE".
Comment 6 Marja Van Waes 2016-06-02 15:03:34 CEST
Btw, how/when did you start this cauldron?

If it dates from a recent traditional install, then it is probably useful to attach  /root/drakx/report.bug.xz
Comment 7 Thierry Vignaud 2016-06-02 15:30:07 CEST
Err... That was a build fix.
I only ajusted the file list in order to prevent: "error: File not found: ...usr/share/locale/en_BE*

If we really want en_BE, we've to uncomment the block around liens 300-310
I don't know why Thomas disabled en_BE when updating to 2.22

Assignee: thierry.vignaud => tmb

Comment 8 Thierry Vignaud 2016-06-02 15:32:35 CEST
Created attachment 7890 [details]
re-enable en_BE

This is as simple as that (tested through a local build).
I can push a fixed locales if tmb has no time for that.

CC: (none) => thierry.vignaud

Comment 9 Thomas Backlund 2016-06-02 16:00:41 CEST
(In reply to Thierry Vignaud from comment #7)
> Err... That was a build fix.
> I only ajusted the file list in order to prevent: "error: File not found:
> ...usr/share/locale/en_BE*
> 
> If we really want en_BE, we've to uncomment the block around liens 300-310
> I don't know why Thomas disabled en_BE when updating to 2.22

I do :)
There were some locale generation problem when moving to 2.22, so I temporarily disabled it during tests...

Unfortunately I forgot to re-enable it :/



(In reply to Thierry Vignaud from comment #8)
> Created attachment 7890 [details]
> re-enable en_BE
> 
> This is as simple as that (tested through a local build).
> I can push a fixed locales if tmb has no time for that.

Thanks tv for fixing my mess :)
Comment 10 Thierry Vignaud 2016-06-02 16:01:39 CEST
A fixed locale is being build

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 11 Chris Denice 2016-06-02 16:17:01 CEST
thanks guys :)
Comment 12 Martin Whitaker 2016-06-02 19:59:03 CEST
(In reply to Chris Denice from comment #3)
> An user could select any language he fancies + selecting any location he
> lives. All combinations should be allowed.

It may be worth noting that en_BE is a special case. All combinations of language and country are not supported - only combinations where there is a significant community. See http://userguide.icu-project.org/locale.

I was quite surprised that en_BE was a valid combination. I guess it has to do with Brussels being the EU headquarters.

Also note that your timezone setting is independent of your locale setting.

Note You need to log in before you can comment on or make changes to this bug.