From bd25cd01ac9edf9fd6f1ed0f062032b1b80fc91f Mon Sep 17 00:00:00 2001 From: Moritz Kiefer Date: Thu, 5 Mar 2020 15:34:24 +0100 Subject: [PATCH] Set the streams to utf8 in Main.hs (#466) --- exe/Main.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/exe/Main.hs b/exe/Main.hs index 828b11c7..45cc4c6b 100644 --- a/exe/Main.hs +++ b/exe/Main.hs @@ -101,6 +101,10 @@ main = do initialise caps (cradleRules >> mainRule >> pluginRules plugins >> action kick) getLspId event (logger minBound) debouncer options vfs else do + -- GHC produces messages with UTF8 in them, so make sure the terminal doesn't error + hSetEncoding stdout utf8 + hSetEncoding stderr utf8 + putStrLn $ "Ghcide setup tester in " ++ dir ++ "." putStrLn "Report bugs at https://github.com/digital-asset/ghcide/issues"