On Sat, Aug 14, 2010 at 12:15 PM, Florian Weimer <span dir="ltr">&lt;<a href="mailto:fw@deneb.enyo.de">fw@deneb.enyo.de</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

* Bryan O&#39;Sullivan:<br>
<div class="im"><br>
&gt; If you know it&#39;s text and not binary data you are working with, you should<br>
&gt; still use Data.Text. There are a few good reasons.<br>
&gt;<br>
</div>&gt;    1. The API is more correct. For instance, if you use Text.toUpper on a<br>
<div class="im">&gt;    string containing latin1 &quot;ß&quot; (eszett, sharp S), you&#39;ll get the<br>
&gt;    two-character sequence &quot;SS&quot;, which is correct. Using Char8.map Char.toUpper<br>
&gt;    here gives the wrong answer.<br>
<br>
</div>Data.Text ist still incorrect for some scripts:<br>
<br>
$ LANG=tr_TR.UTF-8 ghci<br>
GHCi, version 6.12.1: <a href="http://www.haskell.org/ghc/" target="_blank">http://www.haskell.org/ghc/</a>  :? for help<br>
Loading package ghc-prim ... linking ... done.<br>
Loading package integer-gmp ... linking ... done.<br>
Loading package base ... linking ... done.<br>
Prelude&gt; import Data.Text<br>
Prelude Data.Text&gt; toUpper $ pack &quot;i&quot;<br>
Loading package array-0.3.0.0 ... linking ... done.<br>
Loading package containers-0.3.0.0 ... linking ... done.<br>
Loading package deepseq-1.1.0.0 ... linking ... done.<br>
Loading package bytestring-0.9.1.5 ... linking ... done.<br>
Loading package text-0.7.2.1 ... linking ... done.<br>
&quot;I&quot;<br>
Prelude Data.Text&gt;</blockquote><div><br></div><div>Yes. We need locale support for that one. I think Bryan is planning to add it.</div><div><br></div><div>-- Johan</div><div> </div></div>