Non-breaking space missing from iswspace() and iswblank()
Jeff Johnston
jjohnstn@redhat.com
Mon Aug 24 22:15:00 GMT 2009
Patch checked in.
Thanks,
-- Jeff J.
Andy Koppe wrote:
> The iswspace and iswblank 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.
>
> Regards,
> Andy
>
More information about the Newlib
mailing list