8

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?

0

2 Answers 2

9

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.

2
  • according this answer macOS has LANG=C LC_CTYPE=UTF-8 (close enough)
    – jan
    Jun 2, 2021 at 11:40
  • That was only a guess (or wishful thinking in the case of the cited bug report). Jun 2, 2021 at 19:17
5

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .