
28 Mar
2011
28 Mar
'11
12:24 p.m.
On Mar 28, 2011, at 12:05 PM, Christopher Done wrote:
On 28 March 2011 17:55, malcolm.wallace
wrote: Does anyone else think it odd that Prelude.words will break a string at a non-breaking space? Prelude> words "abc def\xA0ghi" ["abc","def","ghi"]
I think it's predictable, isSpace (which words is based on) is based on generalCategory, which returns the proper Unicode category:
λ> generalCategory '\xa0' Space
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- breaking spaces. -- James