Non-breaking space missing from iswspace() and iswblank()
Andy Koppe
andy.koppe@gmail.com
Mon Aug 24 20:00:00 GMT 2009
> The iswspace and iswblank functions don't currently consider the "non-breaking
> space" character U+00A0 as a space.
>
> Test:
> #include <ctype.h>
> #include <wctype.h>
> #include <locale.h>
>
> int main(void) {
> puts(setlocale(LC_CTYPE, "en.ISO-8859-1") ?: "C");
> printf("isspace(0xA0) == %i\n", isspace(0xA0));
> printf("iswspace(0xA0) == %i\n", iswspace(0xA0));
> printf("isblank(0xA0) == %i\n", isblank(0xA0));
> printf("iswblank(0xA0) == %i\n", iswblank(0xA0));
> return 0;
> }
>
> Output:
> isspace(0xA0) == 8
> iswspace(0xA0) == 0
> isblank(0xA0) == 1
> iswblank(0xA0) == 0
>
> Patch attached.
ChangeLog:
* libc/ctype/iswspace.c (iswspace): Include "non-breaking
space" (U+00A0).
* libc/ctype/iswblank.c (iswblank): Likewise.
More information about the Newlib
mailing list