[Haskell-cafe] UTF-16

Bayley, Alistair Alistair_Bayley at invescoperpetual.co.uk
Thu Jul 26 05:57:58 EDT 2007

> From: Bulat Ziganshin [mailto:bulat.ziganshin at gmail.com] 
> > Obviously a proliferation of UTF8 modules isn't great for 
> code re-use.
> > Is there a plan to consolidate and expose UTF8 and UTF16 de- and
> > encoders in the libraries?
> afair there is utf-string module, which provides utf-8 functionality.
> may be we should just add utf-16 support there?

Probably. Is Codec.Binary.UTF8.String the best namespace for it? (why
Binary?) Where should FFI functions that marshal to-and-from UTF8
encoded CStrings sit?

Also, the UTF8 decoder decodes up to 6 bytes per char, which AFAIUI is
not standards compliant.

It'd be nice if these ended up somewhere in the base libs, or (if we're
looking to reduce the size of base) in the standard distributions, so
that (as a UTF8 library user) I don't feel compelled to either:
 - add another dependency to my project, or
 - copy the code into my project, or
 - implement my own de/encoder to fill a gap in this one

Confidentiality Note: The information contained in this message,
and any attachments, may contain confidential and/or privileged
material. It is intended solely for the person(s) or entity to
which it is addressed. Any review, retransmission, dissemination,
or taking of any action in reliance upon this information by
persons or entities other than the intended recipient(s) is
prohibited. If you received this in error, please contact the
sender and delete the material from any computer.

More information about the Haskell-Cafe mailing list