One of the NetBSD locales is pretty broken. I've reported it to the NetBSD people. I'm not adding a workaround to gnulib, since the number of users of this NetBSD locale is probably very small.
2023-04-09 Bruno Haible <br...@clisp.org> doc: Mention a NetBSD bug. * doc/posix-functions/towlower.texi: Mention NetBSD bug 57339. * doc/posix-functions/towupper.texi: Likewise. diff --git a/doc/posix-functions/towlower.texi b/doc/posix-functions/towlower.texi index a53c96f438..a8ef3ce990 100644 --- a/doc/posix-functions/towlower.texi +++ b/doc/posix-functions/towlower.texi @@ -23,4 +23,9 @@ @item On Windows and 32-bit AIX platforms, @code{wchar_t} is a 16-bit type and therefore cannot accommodate all Unicode characters. +@item +This function returns wrong values even for the ASCII characters +in a zh_CN.GB18030 locale on some platforms: +@c https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=57339 +NetBSD 9.0. @end itemize diff --git a/doc/posix-functions/towupper.texi b/doc/posix-functions/towupper.texi index 823ff29743..902cf16e68 100644 --- a/doc/posix-functions/towupper.texi +++ b/doc/posix-functions/towupper.texi @@ -23,4 +23,9 @@ @item On Windows and 32-bit AIX platforms, @code{wchar_t} is a 16-bit type and therefore cannot accommodate all Unicode characters. +@item +This function returns wrong values even for the ASCII characters +in a zh_CN.GB18030 locale on some platforms: +@c https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=57339 +NetBSD 9.0. @end itemize