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: [RFC] Refresh iswblank and iswspace (was Re: Update wctype functions to Unicode 5.2?)


On Feb 15 20:25, Howland Craig D (Craig) wrote:
> Both C99 and POSIX say that blank is only space and horizontal tab in
> the C/POSIX locale.  So strictly speaking, it would appear that a
> locale check would be needed.  (On the other hand, it could possibly be
> considered a mistake in the standards to make such a statement,
> ignoring any definitions provided with the extended character set.)
>  
> This observation, however, is not directly related to the patch under
> consideration, but is pointing to an existing flaw.

Right.  I don't worry for now, but we should fix that soon.

I'd suggest to check for the locale being exactly "C" and if so, only
return chars <= 0x7f.  Every other locale is undefined and so allows to
report any character in the Unicode range.


Corinna

-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat


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