This sounds to me like a classical case of a wrongly (or not) configured locale/terminal. As a starting point I would check both what the locale variables are set to (run "locale" in the shell) and check what encoding the terminal is set to. I've noticed a lot of linux installs have completely borked configuration with regards to these and in those cases GHC can't do much.
Side note: Just forcing output to be utf8 is *definitely* the wrong thing to do, as it'd break any environment set to a different encoding...
Cheers,
Merijn
> ______________________________
> On 11 Apr 2017, at 1:24, Yuji Yamamoto <whosekiteneverfly@gmail.com> wrote:
>
> Hello Haskellers,
>
> Currently, I’m working on this issue,
> where haddock crashes when printing the Unicode “bullet character” 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.
>
> So, I believe there’s a better way to handle the case, and GHC knows it.
> Then, how does GHC detect the handle’s character encoding and convert incompatible characters (such as the bullet character) into “?” to avoid the error?
> I couldn’t get it by reading the source of GHC a bit.
>
> Thanks in advance!
>
_________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell- cafe
> Only members subscribed via the mailman list are allowed to post.