diff options
Diffstat (limited to 'ghc')
-rw-r--r-- | ghc/Main.hs | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/ghc/Main.hs b/ghc/Main.hs index b720dea3db..276546bc95 100644 --- a/ghc/Main.hs +++ b/ghc/Main.hs @@ -40,6 +40,7 @@ import Module ( ModuleName ) -- Various other random stuff that we need +import GHC.HandleEncoding import Config import Constants import HscTypes @@ -92,18 +93,7 @@ main = do hSetBuffering stdout LineBuffering hSetBuffering stderr LineBuffering - -- Handle GHC-specific character encoding flags, allowing us to control how - -- GHC produces output regardless of OS. - env <- getEnvironment - case lookup "GHC_CHARENC" env of - Just "UTF-8" -> do - hSetEncoding stdout utf8 - hSetEncoding stderr utf8 - _ -> do - -- Avoid GHC erroring out when trying to display unhandled characters - hSetTranslit stdout - hSetTranslit stderr - + configureHandleEncoding GHC.defaultErrorHandler defaultFatalMessager defaultFlushOut $ do -- 1. extract the -B flag from the args argv0 <- getArgs |