Günther Schmidt <gue.schm...@web.de> writes:
> thanks for the tip, but how do I use the library?
> I can't really make out how to feed it UTF-16 and get String (UTF-8)
> back.

One way (probably not very efficient):

import Data.Text.Encoding

convert :: Bytestring -> Bytestring
convert = encodeUtf8 . decodeUtf16LE

No claims are made about efficiency of this technique (mainly because
unless you're already using Bytestrings, then it probably isn't very
efficient).

-- 
Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com
IvanMiljenovic.wordpress.com
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to