
28 Jan
2010
28 Jan
'10
8:17 a.m.
Günther Schmidt
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.Miljenovic@gmail.com IvanMiljenovic.wordpress.com