Locale inconsistency between `localectl` and `locale`

This is probably trivial, but I am currently running Fedora (41, i3 spin) and I noticed there’s an inconsistency in the locale defined with localectl and locale:

$ localectl status
System Locale: LANG=en_AU.UTF-8
    VC Keymap: us
   X11 Layout: au
    X11 Model: pc105
$ locale
LANG=en_AU.utf8
LC_CTYPE="en_AU.utf8"
LC_NUMERIC="en_AU.utf8"
LC_TIME="en_AU.utf8"
LC_COLLATE="en_AU.utf8"
LC_MONETARY="en_AU.utf8"
LC_MESSAGES="en_AU.utf8"
LC_PAPER="en_AU.utf8"
LC_NAME="en_AU.utf8"
LC_ADDRESS="en_AU.utf8"
LC_TELEPHONE="en_AU.utf8"
LC_MEASUREMENT="en_AU.utf8"
LC_IDENTIFICATION="en_AU.utf8"
LC_ALL=

Is it meant to look like this? Why is the capitalisation/quotation different between the two?

I don’t know why that’s happening for you, but it shouldn’t matter.

glibc canonicalizes the locale suffix by ignoring non-alphanumeric characters and converting letters to lowercase, so the two versions are equivalent.

Regarding the quotes, I found this in locale(1):

Values for variables set in the environment are printed without double quotes, implied values are printed with double quotes.

I never noticed that detail before.

1 Like

For those who don’t knos.

When you see locale(1) it means that you should run man 1 locale. That is old unix history.

1 Like