Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information