[Haskell-cafe] Getting a string from url-converted UTF8 input

Roman Cheplyaka roma at ro-che.info
Sun May 16 11:56:58 EDT 2010


* Eugene Dzhurinsky <bofh at redwerk.com> [2010-05-16 18:42:08+0300]
> Hello all!
> 
> Can somebody please explain wha am I doing in wrong way?
> 
> [snip]
> 
> I am getting the output:
> 
> ===============================================================
> 1) 345 =K=G5 <>4=> 1 at 0BL :=86:8 2 2845 FB2?
> 
> 2) :0:>9 5ABL A>DB =0 65;57:C B8?0 B5;5D>= A Symbian
> ===============================================================
> 
> which is wrong. So what do I miss in encoding the data in UTF?

I assume you are using GHC < 6.12. The trouble is in conversion done by
putStrLn. Use one from System.IO.UTF8.

Or try to upgrade to GHC 6.12 which respects the locale settings.

-- 
Roman I. Cheplyaka :: http://ro-che.info/
"Don't let school get in the way of your education." - Mark Twain


More information about the Haskell-Cafe mailing list