[Haskell-cafe] bug in Prelude.words?

Colin Adams colinpauladams at googlemail.com
Mon Mar 28 18:02:08 CEST 2011


It doesn't seem odd to me.

Consider an HTML page with that "sentence" displayed on it. If you ask the
viewer of the page how many words are in the sentence, then surely you will
get the answer 3?

On 28 March 2011 16:55, malcolm.wallace <malcolm.wallace at me.com> 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 would have expected this to be the obvious behaviour:
>
> Prelude> words "abc def\xA0ghi"
> ["abc","def\160ghi"]
>
> Regards,
> Malcolm
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>


-- 
Colin Adams
Preston, Lancashire, ENGLAND
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110328/0df220e3/attachment.htm>


More information about the Haskell-Cafe mailing list