[Haskell-cafe] question about show
k at ioctl.it
k at ioctl.it
Wed Mar 5 22:20:25 UTC 2014
Okay, it makes somewhat more sense now after reading that thread. But
technically, why does
show "ü"
not handle Unicode? Isn't the internal representation of [Char]
actually still Unicode, as per
[1]http://hackage.haskell.org/package/base-4.6.0.1/docs/Data-Char.html
Thanks!
k
On Wed, Mar 5, 2014, at 01:46 PM, Clark Gaebel wrote:
"Show" is for debug output. It's not a generic "to_string". See this
thread [1] from last week for more info.
- Clark
[1] [2]https://groups.google.com/forum/#!topic/haskell-cafe/32EeI96b1VQ
On Wed, Mar 5, 2014 at 4:43 PM, <[3]k at ioctl.it> wrote:
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
_______________________________________________
Haskell-Cafe mailing list
[4]Haskell-Cafe at haskell.org
[5]http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Clark.
Key ID : 0x78099922
Fingerprint: B292 493C 51AE F3AB D016 DD04 E5E3 C36F 5534 F907
References
1. http://hackage.haskell.org/package/base-4.6.0.1/docs/Data-Char.html
2. https://groups.google.com/forum/#!topic/haskell-cafe/32EeI96b1VQ
3. mailto:k at ioctl.it
4. mailto:Haskell-Cafe at haskell.org
5. http://www.haskell.org/mailman/listinfo/haskell-cafe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140305/b1b5ddc0/attachment.html>
More information about the Haskell-Cafe
mailing list