wchar_t signedness is platform-dependant, and it's actually signed on
powerpc, riscv and x86. We make some assumptions in Libc that they
aren't negative, which could lead to some invalid accesses.
Ensure that comparisons for <= UCHAR_MAX also confirm that the value is
positive, and in largesearch() let's cast it to an unsigned value in
case we actually do have a character mapped but it's just unfortunately
out of range for our signed wchar_t. We still have a chance of doing
the right thing.
Sponsored by: Klara, Inc.