Bug 241570 - locale - LC_* variables are "C" when I set UTF-8 locale
Summary: locale - LC_* variables are "C" when I set UTF-8 locale
Status: Closed DUPLICATE of bug 231965
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 11.3-STABLE
Hardware: sparc64 Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-29 13:10 UTC by Eugene Bolshakoff
Modified: 2020-12-20 03:52 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Bolshakoff 2019-10-29 13:10:54 UTC
Hello,

I am trying to set UTF-8 locale using 'russian' login class:

russian|Russian Users Accounts:\
        :charset=UTF-8:\
        :lang=ru_RU.UTF-8:\
        :setenv=LC_MESSAGES=en_US.UTF-8,LC_TIME=en_US.UTF-8:\
        :tc=default:

My user has 'russian' login class, but localization isn't working properly.

The output of locale command:
[mercurius@tyler ~]$ locale
LANG=ru_RU.UTF-8
LC_CTYPE="C"
LC_COLLATE="C"
LC_TIME="C"
LC_NUMERIC="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=

for example, tmux also shows error:

[mercurius@tyler ~]$ tmux
tmux: invalid LC_ALL, LC_CTYPE or LANG
Comment 1 Conrad Meyer freebsd_committer freebsd_triage 2019-10-29 18:11:38 UTC
Have you run cap_mkdb after updating user login class?
Comment 2 Eugene Bolshakoff 2019-10-29 18:35:25 UTC
(In reply to Conrad Meyer from comment #1)
Yes, I have. I also tried other locales (en_US.UTF-8, for example).
Comment 3 Eugene Bolshakoff 2019-10-30 10:54:42 UTC
It really looks strange. I opened topic at FreeBSD Forums and people think there "this can't happen"

Because, if I check shell env variables, they're set correctly:
[mercurius@tyler ~]$ printenv | grep LC
LC_MESSAGES=en_US.UTF-8
LC_TIME=en_US.UTF-8

but 'locale' shows they all as C.
Comment 4 devel 2020-02-16 15:33:16 UTC
I have the same problem with 11.2-RC3  on powerpc(32bit).

minimac2:~ % setenv | grep UTF
MM_CHARSET=UTF-8
LANG=ru_RU.UTF-8

minimac2:~ % locale
LANG=ru_RU.UTF-8
LC_CTYPE="C"
LC_COLLATE="C"
LC_TIME="C"
LC_NUMERIC="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=
Comment 5 Yuri Pankov freebsd_committer freebsd_triage 2020-02-16 18:45:22 UTC
(In reply to devel from comment #4)
11.2-RC3 is unsupported, and this should be fixed in 12.x -- see bug 231965.
Comment 6 devel 2020-02-17 13:05:20 UTC
Thanks for poining.
Comment 7 bel 2020-07-03 08:43:47 UTC
The files in /usr/share/locale is broken in base distribution by crosscompiling.
How to recreate /usr/share/locale infrastructure by native building?
Comment 8 Yuri Pankov freebsd_committer freebsd_triage 2020-12-02 22:58:18 UTC
(In reply to bel from comment #7)
What release are you running exactly? Cross-compiling locale data is expected to be fixed starting with 12.0.
Comment 9 Yuri Pankov freebsd_committer freebsd_triage 2020-12-20 03:52:15 UTC
I'm going to close this as fixed in all supported releases.  If there are other related issues, please open new PR.

*** This bug has been marked as a duplicate of bug 231965 ***