Hi, (It is not directly related to mingw-w64, but this got me very confused and this issue is related to CRTs.)
The `_isctype('\t', _BLANK)` and `iswctype(L'\t', _BLANK)` disagree. They disagree not only for different locales (which would make sense), but also for different CRTs. I attached a simple program which can be used to reproduce this behavior. Here's the summary: MSVCRT, "C" locale: ``` _isctype: 0 iswctype: 1 ``` MSVCRT, locales other than "C": ``` _isctype: 1 iswctype: 1 ``` UCRT, "C" locale: ``` _isctype: 0 iswctype: 0 ``` UCRT, locales other than "C": ``` _isctype: 1 iswctype: 0 ``` If I am correct, both should return non-zero in "C" locale. I compared this to behavior of is[w]blank in glibc. They always return non-zero. - Kirill Makurin
#define __USE_MINGW_ANSI_STDIO 0 #define _CTYPE_DISABLE_MACROS #include <ctype.h> #include <locale.h> #include <stdio.h> #include <wctype.h> int main (int argc, char **argv) { setlocale (LC_ALL, argc > 1 ? argv[1] : "C"); wprintf (L"isblank(\\t): %d\n", !!_isctype ('\t', _BLANK)); wprintf (L"iswblank(\\t): %d\n", !!iswctype (L'\t', _BLANK)); return 0; }
_______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public