POSIX provides a way to the libc implementor to add non-ASCII characters to the "digit" character class. However, ISO C 99 section 7.25.2.1.5 takes that freedom away. The iswdigit() function is not ISO C compliant on a number of platforms. This series of patches provides the workaround. 2020-01-25 Bruno Haible mbchar, wctype: Use the corrected iswdigit function. * modules/mbchar (Depends-on): Add iswdigit. * modules/wctype (Depends-on): Likewise. iswdigit: Add tests. * tests/test-iswdigit.c: New file. * tests/test-iswdigit.sh: New file. * modules/iswdigit-tests: New file. iswdigit: New module. * m4/iswdigit.m4: New file. * lib/wctype.in.h (iswdigit): Potentially override. (iswdigit, rpl_iswdigit): Test REPLACE_ISWDIGIT, not REPLACE_ISWCNTRL. * lib/iswdigit.c: New file. * m4/wctype_h.m4 (gl_WCTYPE_H_DEFAULTS): Initialize GNULIB_ISWDIGIT, REPLACE_ISWDIGIT. * modules/wctype-h (Makefile.am): Substitute GNULIB_ISWDIGIT, REPLACE_ISWDIGIT. * modules/iswdigit: New file. * doc/posix-functions/iswdigit.texi: Mention the portability problem.