Quoth Sean Leather <leat...@cs.uu.nl>,

> 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?

Use both?

I am not familiar with Text, but UTF-8 is pretty awkward, and I will
sure look into Text before wasting any time trying to fine-tune my
ByteString handling for UTF-8.

But in practice only a fraction of my data input will be manipulated
in an encoding-sensitive context.  I'm thinking _all_ data is binary,
and accordingly all inputs are ByteString;  conversion to Text will
happen as needed for ... uh, wait, is there a conversion from
ByteString to Text?  Well, if not, no doubt that's coming.

        Donn Cave, d...@avvanta.com
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to