Jonathan
Jonathan

Reputation: 11

How come the pound sign '£' in Haskell is shown as '\163' instead of outputting '£'?

I'm trying to write a program that writes the pound sign '£' in Haskell, but it outputs '\163' whenever I try to use it. 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 '£'.

Thank you.

Upvotes: 0

Views: 174

Answers (1)

Jonathan
Jonathan

Reputation: 11

This was solved by using putStrLn, because print and show do not allow for non-ASCII characters to be shown.

Upvotes: 1

Related Questions