[Haskell-cafe] How to show a utf8 string?

2012-01-10 Thread Magicloud Magiclouds
Hi, I am using LDAP hackage to do some ldap searching. I am not sure if this is its problem. All Chinese chars returned like \29579. How to convert it to the actual Chinese char? I thought it was my terminal's fault, so tried to use System.IO.UTF8 to put the result into a file and viewed by

Re: [Haskell-cafe] How to show a utf8 string?

2012-01-10 Thread Roel van Dijk
Have you tried using putStrLn? Small GHCI example: Prelude putStrLn \29579 王 I believe the Show instances for chars and strings escape all characters with a codepoint 127. 2012/1/10 Magicloud Magiclouds magicloud.magiclo...@gmail.com: Hi,  I am using LDAP hackage to do some ldap

Re: [Haskell-cafe] How to show a utf8 string?

2012-01-10 Thread Felipe Almeida Lessa
On Tue, Jan 10, 2012 at 7:55 AM, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: Hi,  I am using LDAP hackage to do some ldap searching. I am not sure if this is its problem. All Chinese chars returned like \29579.  How to convert it to the actual Chinese char? I thought it was my

Re: [Haskell-cafe] How to show a utf8 string?

2012-01-10 Thread Magicloud Magiclouds
Thank you guys. I forgot the point that print involves show. On Tue, Jan 10, 2012 at 6:27 PM, Roel van Dijk vandijk.r...@gmail.com wrote: Have you tried using putStrLn? Small GHCI example:  Prelude putStrLn \29579  王 I believe the Show instances for chars and strings escape all