on master help sign in
Set the streams to utf8 in Main.hs (#466)
commitbd25cd01ac9edf9fd6f1ed0f062032b1b80fc91f authorMoritz Kiefer <moritz.kiefer@purelyfunctional.org> dateThu 5 Mar 2020, 15:34 (7 years ago) parentdf63fd7
1 file changed+4
exe/Main.hs+4
exe/Main.hs+4
@@ -101,6 +101,10 @@ main = do
101101 initialise caps (cradleRules >> mainRule >> pluginRules plugins >> action kick)
102102 getLspId event (logger minBound) debouncer options vfs
103103 else do
104+ -- GHC produces messages with UTF8 in them, so make sure the terminal doesn't error
105+ hSetEncoding stdout utf8
106+ hSetEncoding stderr utf8
107+
104108 putStrLn $ "Ghcide setup tester in " ++ dir ++ "."
105109 putStrLn "Report bugs at https://github.com/digital-asset/ghcide/issues"
106110