[英]How come the pound sign '£' in Haskell is shown as '\163' instead of outputting '£'? [duplicate]
I'm trying to write a program that writes the pound sign '£' in Haskell, but it outputs '\163' whenever I try to use it.我正在尝试编写一个在 Haskell 中写入井号“£”的程序,但每当我尝试使用它时它都会输出“\163”。 I'm guessing that this is some alphanumeric code, but how do I get it to display what I want it to?
我猜这是一些字母数字代码,但是如何让它显示我想要的内容? I'm writing to the console, when calling a function that returns '£'.
当调用返回“£”的 function 时,我正在写信给控制台。
Thank you.谢谢你。
This was solved by using putStrLn, because print
and show
do not allow for non-ASCII characters to be shown.这已通过使用 putStrLn 解决,因为
print
和show
不允许显示非 ASCII 字符。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.