
20 Aug
2009
20 Aug
'09
3:32 a.m.
On Thu, Aug 20, 2009 at 5:12 PM, Colin Paul
Adams
Yes, but surely this will work both ways. The same bytes on input should come back on output, shouldn't they?
I would have thought so, but apparently this isn't actually what happens. GHCi, version 6.8.2: http://www.haskell.org/ghc/ :? for help Loading package base ... linking ... done. Prelude> map Data.Char.ord "饁" [39233] <== 0x9941 Prelude> putStrLn "饁" A <== 0x41 It seems that GHCi is clever enough to decode UTF-8 input, which only serves to confuse System.IO even more. Stuart