Bug 348678 - Invalid locale being set
Summary: Invalid locale being set
Status: RESOLVED DOWNSTREAM
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_clock (show other bugs)
Version: 5.3.0
Platform: Fedora RPMs Linux
: NOR minor
Target Milestone: ---
Assignee: Lukáš Tinkl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-04 01:02 UTC by Ed Greshko
Modified: 2015-09-18 12:25 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
C locale in settings (85.88 KB, image/png)
2015-09-11 10:45 UTC, Ivan Romanov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Greshko 2015-06-04 01:02:41 UTC
When you set the Time to use C (default) the locale is set to LC_TIME=C.UTF-8.  Since there is no C.UTF-8 locale some commands generate warning messages like "Failed to set locale, defaulting to C".

Reproducible: Always

Steps to Reproduce:
1. Set Time to use C in systemsettings
2. Type locale and see the bad settings
3.

Actual Results:  
LC_TIME=C.UTF-8

Expected Results:  
LC_TIME=C
Comment 1 Ivan Romanov 2015-08-21 16:43:21 UTC
Here https://bugzilla.redhat.com/show_bug.cgi?id=1250238 patch to fix this.
Comment 2 Jeremy Whiting 2015-09-10 21:32:20 UTC
I took a quick look and don't see where in the Date & Time kcm to set the Time to use C? where did you do that?
Comment 3 Ivan Romanov 2015-09-11 10:45:57 UTC
Created attachment 94507 [details]
C locale in settings

Look at the screenshot.
Comment 4 Jeremy Whiting 2015-09-11 12:56:41 UTC
From that bug report at redhat it seems the issue is a redhat/fedora specific issue. I'm able to use the Time "Default (C)" here and see no errors about having C.UTF-8 in my locale. It seems to be because redhat/fedora doesn't have that locale yet. It appears the customization has happened in a fedora package patch, so shouldn't be a problem anymore.
Comment 5 Rex Dieter 2015-09-11 13:46:37 UTC
From my understanding, the characterization in comment #4 is incorrect.  My understanding is:

* yes, fedora/redhat doesn't have that locale yet, but that is because... (stock/upstream) glibc doesn't support that locale yet either, see https://sourceware.org/bugzilla/show_bug.cgi?id=17318

* Some other distributions are patching in support for it themselves, for example, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636086

Handling both cases understandably could make *this* bug more difficult.  I would argue kde should prioritize support for the stock case (of course, I'm biased).
Comment 6 Jeremy Whiting 2015-09-11 13:48:23 UTC
I see, if KDE adopts the patch from upstream will that cause any trouble with distributions that do have C.UTF-8 locale support? If not I say yeah, we should add it (and I will, np)
Comment 7 Jeremy Whiting 2015-09-11 13:48:43 UTC
s/upstream/redhat bug report/
Comment 8 Rex Dieter 2015-09-11 13:52:12 UTC
The impact of adopting this change will be that LANG (and friends) will end up being "C" instead of "C.UTF-8".  I'm not a locale expert, and it *is* a change of behavior which could be argued to qualify as "trouble", but not having this change is also the cause of trouble for unpatched distros too.
Comment 9 Rex Dieter 2015-09-18 12:25:34 UTC
Fwiw, looks like fedora finally adopted C.UTF-8 in it's rawhide development branch (uncertain about gliibc upstream status), so as far as *I* am concerned, we can close this without action now.