Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Unicode output in cabal-testsuite #10387

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Sep 27, 2024

  1. Fix Unicode output in cabal-testsuite

    `System.Process.createPipe` calls (through many intermediaries)
    `GHC.IO.Handle.FD.fdToHandle`, whose documentation says:
    
    > Makes a binary Handle. This is for historical reasons; it should
    > probably be a text Handle with the default encoding and newline
    > translation instead.
    
    The documentation for `System.IO.hSetBinaryMode` says:
    
    > This has the same effect as calling `hSetEncoding` with `char8`, together
    > with `hSetNewlineMode` with `noNewlineTranslation`.
    
    But this is a lie, and Unicode written to or read from binary handles is
    always encoded or decoded as Latin-1, which is always the wrong choice.
    
    Therefore, we explicitly set the output to UTF-8 to keep it consistent
    between platforms and correct on all modern computers.
    
    See: https://gitlab.haskell.org/ghc/ghc/-/issues/25307
    9999years committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    7f633d6 View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2024

  1. Configuration menu
    Copy the full SHA
    0592019 View commit details
    Browse the repository at this point in the history