[Haskell-cafe] question about show

k at ioctl.it k at ioctl.it
Wed Mar 5 21:43:47 UTC 2014


Hello!

I'm sure this has been answered many times before, but I can't find an
explanation for this behavior anywhere. The question I have is a general
one regarding 'show'. Why does

main = do
    putStrLn "ü"

➜  ~ runhaskell test.hs
ü


and:

main = do
    putStrLn $ show "ü"

➜  ~ runhaskell test.hs
"\252"

Thank you all for an enlightening answer already!

Best, 

k


More information about the Haskell-Cafe mailing list