Johan Tibell wrote:

> Here'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.
>

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

http://tools.ietf.org/html/rfc3629
http://www.utf8.com/

Regards,
Sean
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to