[Haskell-cafe] Can we improve Show instance for non-ascii charcters?

Michael Orlitzky michael at orlitzky.com
Fri Feb 5 15:58:18 UTC 2016

On 02/03/2016 11:39 PM, Gershom B wrote:
> Backwards compatibility is important, but not an absolute. I’d be
> curious if anyone can point to instances where software might _rely_
> on the show instance for strings not displaying unicode characters?

This will break a bunch of my doctests, but I can just update them.

I would be more concerned about what happens in a terminal/font that
doesn't have unicode support. For the font at least, my xfce4-terminal
does something intelligent and falls back to another font that does have
the fortune cookie symbols.

But for the terminal? Try Ctrl-Alt-F1 to drop out of X and into a
Linux/BSD terminal, and runghc on a file containing,

  main = mapM_ putStrLn $ [(++"の父"), (++"の母")] <*> ["田中", "山田"]

I get a bunch of grey question marks.

More information about the Haskell-Cafe mailing list