Haskell Platform Proposal: add the 'text' library

Ian Lynagh igloo at earth.li
Wed Oct 20 11:59:44 EDT 2010


On Wed, Oct 20, 2010 at 05:28:15PM +0200, Johan Tibell wrote:
> 
> If you process a string code point by code point you might mistakenly
> confuse a plain "a" (A) with a "å" (A-RING *or* A + COMBINING RING).

But isn't that what text does here?:

Data.Text Data.Text.IO> let t = pack "z\x0061\x030A\x0061z"
Data.Text Data.Text.IO> putStrLn t
zåaz
Data.Text Data.Text.IO> putStrLn (replace (pack "a") (pack "y") t)
zẙyz


Thanks
Ian



More information about the Libraries mailing list