7

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 Answers2

8

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):

  • As suggested by Tom Hale, Arch Linux does not use this.

  • 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.

Stephen Kitt
  • 434,908
Thomas Dickey
  • 76,765
4

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.

Tom Hale
  • 30,455