[Haskell-cafe] bug in Prelude.words?
mokus at deepbondi.net
Mon Mar 28 18:24:10 CEST 2011
On Mar 28, 2011, at 12:05 PM, Christopher Done wrote:
> On 28 March 2011 17:55, malcolm.wallace <malcolm.wallace at me.com>
> Does anyone else think it odd that Prelude.words will break a string
> at a non-breaking space?
> Prelude> words "abc def\xA0ghi"
> I think it's predictable, isSpace (which words is based on) is based
> on generalCategory, which returns the proper Unicode category:
> λ> generalCategory '\xa0'
I agree, and I also agree that it would make sense the other way (not
breaking on non-breaking spaces). Perhaps it would be a good idea to
add a remark to the documentation which specifies the treatment of non-
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe