On 2026-04-13 13:34, Dennis Clarke wrote:
Sorry ... forgot to include the actual test-suite log file wherein there
is only one failure!

This appears to be an incompatibility in OpenBSD, which mishandles titlecase characters. In an en_US.UTF-8 locale OpenBSD's towupper function treats the character "Dž" (U+01C5 LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON) differently from GNU/Linux. If you call towupper (0x01C5) on OpenBSD it returns 0x01C5, that is, it acts as if this character is uppercase. However, it's titlecase, not uppercase. It should uppercase to "DŽ", i.e., to U+01C4 LATIN CAPITAL LETTER DZ WITH CARON.

You can verify the incompatibility by running the following program. It should output "towupper (0x01C5) = 0x01C4". Instead, it outputs "towupper (0x01C5) = 0x01C

#include <locale.h>
#include <wctype.h>
#include <stdio.h>

int
main ()
{
  if (!setlocale (LC_ALL, "en_US.UTF-8"))
    return perror ("setlocale"), 1;

  wint_t c = 0x01C5;
  wint_t w = towupper (c);
  printf ("towupper (0x01C5) = 0x%04X\n", (int) w);
}

I wouldn't worry much about this incompatibility. You could report it to the OpenBSD folks if you like.



Reply via email to