[Haskell-cafe] How does GHC avoid "<stderr>: hPutChar: invalid argument (invalid character)"?
Brandon Allbery
allbery.b at gmail.com
Mon Apr 10 23:32:19 UTC 2017
On Mon, Apr 10, 2017 at 7:24 PM, Yuji Yamamoto <whosekiteneverfly at gmail.com>
wrote:
> Currently, I’m working on this issue
> <https://github.com/haskell/haddock/pull/566>,
>
> where haddock crashes when printing the Unicode “bullet character”
> <http://www.fileformat.info/info/unicode/char/2022/index.htm> on stderr
> whose character encoding is not UTF-8.
>
> In the beforementioned pull request, I just added hSetEncoding stderr utf8
> as a quick-and-dirty workaround.
> But GHC actually doesn’t do so: GHC prints “?” instead of the bullet
> character when stderr is not Unicode-compatible.
>
>
https://downloads.haskell.org/~ghc/8.0.2/docs/html/libraries/base-4.9.1.0/GHC-IO-Encoding.html#v:mkTextEncoding
note the suffixes you can add to an encoding name.
--
brandon s allbery kf8nh sine nomine associates
allbery.b at gmail.com ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20170410/4793629e/attachment.html>
More information about the Haskell-Cafe
mailing list