Hi,

f.holop wrote on Tue, Dec 10, 2019 at 05:07:07PM +0100:

> i have noticed that libc collation on OpenBSD is broken (also on macos) :(

It is intentional that OpenBSD does not support collation for locales
other than "C" in libc, and i'm not aware of any developer who might
have plans to add it in the future, not even in the long term.  Even
the people who added collation support to the FreeBSD libc some
years ago have been cursing loudly about it, even though FreeBSD
is often quite ready to add bloat to their system.

My personal opinion is that libc is a general-purpose programming
and operating system support library, whereas locale-specific
collation is a highly specialiced niche task that requires
extremely complicated code, much too large and ugly for a library
like libc.  There is a lot of merit in keeping libc lean and simple,
not least to help correctness, robustness, and security.

For the intended behaviour of OpenBSD, please read:

 * locale(1)
 * setlocale(3), including the CAVEATS in that page
 * strcoll(3)
 * wcscoll(3)

Yours,
  Ingo

Reply via email to