This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Non-breaking space missing from iswspace() and iswblank()


> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]