[Haskell-cafe] UTF-16

Donald Bruce Stewart dons at cse.unsw.edu.au
Thu Jul 26 00:13:37 EDT 2007

> I don't know if anybody cares, but... Today a wrote some trivial code to 
> decode (not encode) UTF-16.
> I believe somebody out there has a UTF-8 decoder, but I needed UTF-16 as 
> it happens. (I didn't bother decoding code points outside the BMP - I'm 
> sure you can figure out why.)
> If anybody is interested, I can share the code - but it's pretty minimal...

Perhaps you could polish it up, and provide it in a form suitable for
use as a patch to:


that is, put it in a module:


and provide the functions:

    encode :: String -> [Word8]
    decode :: [Word8] -> String

? And then submit that as a patch to Eric, the utf8 maintainer.

-- Don

More information about the Haskell-Cafe mailing list