diff options
-rw-r--r-- | libraries/ghc-boot/GHC/HandleEncoding.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libraries/ghc-boot/GHC/HandleEncoding.hs b/libraries/ghc-boot/GHC/HandleEncoding.hs index 3c4c10c70f..54c5582102 100644 --- a/libraries/ghc-boot/GHC/HandleEncoding.hs +++ b/libraries/ghc-boot/GHC/HandleEncoding.hs @@ -10,8 +10,8 @@ import System.IO -- GHC produces output regardless of OS. configureHandleEncoding :: IO () configureHandleEncoding = do - env <- getEnvironment - case lookup "GHC_CHARENC" env of + mb_val <- lookupEnv "GHC_CHARENC" + case mb_val of Just "UTF-8" -> do hSetEncoding stdout utf8 hSetEncoding stderr utf8 |