cygwin 3.6.4 breaks mbrtowc

Thomas Wolff towo@towo.net
Tue Jul 22 03:25:27 GMT 2025


mbrtowc is broken in 3.6.4 which breaks non-BMP display in mintty.
Test case below.
Thomas

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

void mb(unsigned char c)
{
   wchar_t wc;
   int ret = mbrtowc(&wc, &c, 1, 0);
   printf("%02X -> %04X : %d\n", c, wc, ret);
}

void main ()
{
   setlocale (LC_CTYPE, "");

   mb(0xF0);
   mb(0x9F);
   mb(0x98);
   mb(0x8E);
}


More information about the Cygwin mailing list