What causes this error in my shell: "Unknown locale, assuming C"?
28
votes
5
answers
13000
views
**Note**: The question is not about how to change the locale, or what is the locale. The question is about why is there a locale-based error in
in 10.3, but no error in 12.6, even though the locales are identical in both cases. I use iTerm, but this appears in terminal.app as well.
---
After running
, reading a manual entry and closing it, I receive the following error
$ man curl # The manual opens, I read it, then close
Unknown locale, assuming C
$ man zsh # The manual opens, I read it, then close
Unknown locale, assuming C
The manual pages work correctly, and can be browsed, but I have no idea where the error comes from, and it is rather annoying.
This is what I obtain when running
$ locale
LANG=""
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=
I'm using Ventura 13.0. The same error does not happen in 12.6 even though the
is identical (see below), so I do not think that it is an issue with
, but rather an issue with
.
Note that
says
LANG Used as a substitute for any unset LC_* variable. \
If LANG is unset, it will act as if set to "C". If any of LANG or \
LC_* are set to invalid values, locale acts as if they are all unset.
so there should be no error,
should be automatically set to
.
Trying to narrow this down, I ran the same commands on two computers.
Computer 1 runs 13.0 outputs the error.
This computer has
for MacOS 13.0 from January 9 2021.
Computer 2 runs 12.6 and outputs no error.
This computer has
version 1.6g from September 19 2005.
The output of the
command is completely identical on both computers, in particular they both have ="UTF-8"
.
Could it be a
bug?
Asked by Kolja
(726 rep)
Nov 24, 2022, 09:17 AM
Last activity: May 21, 2025, 12:49 PM
Last activity: May 21, 2025, 12:49 PM