<div class="gmail_quote"><div> <br>Johan Tibell wrote:<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Here&#39;s a rule of thumb: If you have binary data, use Data.ByteString. If you have text, use Data.Text. Those libraries have benchmarks and have been well tuned by experienced Haskelleres and should be the fastest and most memory compact in most cases. There are still a few cases where String beats Text but they are being worked on as we speak.<br>

</blockquote><div><br>Which one do you use for strings in HTML or XML in which UTF-8 has become the commonly accepted standard encoding? It&#39;s text, not binary, so I should choose Data.Text. But isn&#39;t there a performance penalty for translating from Data.Text&#39;s internal 16-bit encoding to UTF-8?<br>

<br><a href="http://tools.ietf.org/html/rfc3629">http://tools.ietf.org/html/rfc3629</a><br><a href="http://www.utf8.com/">http://www.utf8.com/</a><br><br>Regards,<br>Sean<br></div></div>