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: New
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 mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-29 13:10 UTC by Eugene Bolshakoff
Modified: 2019-10-30 10:54 UTC (History)
1 user (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 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.