As far as I know, the C.UTF-8 locale started as Debian's attempt to modernize the standard C locale and over time some other distros, such as Fedora, added support for it. But what about other Linux distros, Unices (e.g. BSD and macOS) and environments (e.g. Cygwin and MinGW)? Is it safe to rely on its presence on any modern Unix-like system?
2 Answers
It's "hit or miss" (it largely depends on the propensity of developers to copy features from other systems versus filling missing bits from a standard):
Nor does NetBSD 9
Nor does macOS (Catalina, Mojave, or Big Sur)
But
FreeBSD 12 does,
OpenBSD 6.7 does
OpenSUSE has "C.utf8" (close enough)
Mageia 7 does
Solaris 11.4 does (since 11.4.42)
A minimally sized C.UTF-8
locale was released with GNU C library 2.35. Any distribution with that version of the library (or later) is likely to have C.UTF-8
. At some point that will be relevant for Arch Linux (as of September 8, 2021, it uses glibc 2.33). The other platforms are unaffected.

- 434,908

- 76,765
-
according this answer macOS has LANG=C LC_CTYPE=UTF-8 (close enough) – jan Jun 02 '21 at 11:40
-
That was only a guess (or wishful thinking in the case of the cited bug report). – Thomas Dickey Jun 02 '21 at 19:17
In short: No.
The Manjaro Linux (Arch based) output of locale -a
is only:
C
en_AU.utf8
en_US.utf8
POSIX
I assume the upstream Arch Linux is the same, also missing your required C.UTF-8
.
Both Manjaro and Arch are very much modern Unices.

- 30,455