[Haskell-cafe] unicode text libraries

Duncan Coutts duncan.coutts at googlemail.com
Tue Sep 29 06:23:02 EDT 2009


On Tue, 2009-09-29 at 10:48 +0200, Ketil Malde wrote:
> Johan Tibell <johan.tibell at gmail.com> writes:
> 
> > I agree with Don. Also, I don't think that a Unicode type should
> > mention what encoding it uses as it's an implementation detail.
> 
> Right.  I see from the documentation that it uses Word16s (and presumably
> the utf-16 encoding).  Out of curiosity, why was this particular
> encoding chosen, as opposed to utf-8 or utf-32/ucs-4?  Any benchmarks or
> other information?

Yes, the choice was based on benchmarks. All three (UTF-8,16,32) were
implemented and benchmarked. You can read about the details in Tom
Harper's MSc thesis.

Duncan



More information about the Haskell-Cafe mailing list