
20 Oct
2010
20 Oct
'10
4:52 p.m.
On Wed, Oct 20, 2010 at 5:59 PM, Ian Lynagh
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
I think the right thing to do here is to perform normalization first but I'm not sure. Some Unicode expert should chime in about what the right semantics of 'replace' is. Johan