[PATCH 0/2] newlib: testsuite: two stale multibyte expectations

Bernie Innocenti bernie@codewiz.org
Thu Oct 15 13:33:42 GMT 2026


These two tests fail on any target that runs their multibyte branches.
The library is right in both cases; the expectations predate changes made
in 2009 and 2018.

UTF-8.c still fails after patch 2, and this time the test is right: the
UTF-8 decoder accepts UTF-16 surrogates (U+D800..U+DFFF) encoded in three
bytes, such as ED A0 80, which RFC 3629 forbids.  Sections 5.1 and 5.2 of
the test expect them to be rejected.  Is accepting them deliberate, for
Cygwin's 16-bit wchar_t perhaps?  If not, I can send a patch for
__utf8_mbtowc.

Found while bringing newlib's testsuite up on m68k-amigaos.

Bernie Innocenti (2):
  newlib: testsuite: twctype.c: U+0967 is a digit, not a letter
  newlib: testsuite: UTF-8.exp: code points above U+10FFFF are invalid

 newlib/testsuite/newlib.locale/UTF-8.exp | 12 ++++++------
 newlib/testsuite/newlib.wctype/twctype.c |  4 +++-
 2 files changed, 9 insertions(+), 7 deletions(-)

-- 
2.56.0



More information about the Newlib mailing list