diff --git a/Language/Haskell/GhcMod/Lint.hs b/Language/Haskell/GhcMod/Lint.hs index f217772..f6c549f 100644 --- a/Language/Haskell/GhcMod/Lint.hs +++ b/Language/Haskell/GhcMod/Lint.hs @@ -22,7 +22,7 @@ lint opt file = ghandle handler $ withMappedFile file $ \tempfile -> do (flags, classify, hint) <- liftIO $ argsSettings $ optLintHlintOpts opt hSrc <- liftIO $ openFile tempfile ReadMode - liftIO $ hSetEncoding hSrc utf8 + liftIO $ hSetEncoding hSrc (encoding flags) res <- liftIO $ parseModuleEx flags file =<< Just `fmap` hGetContents hSrc case res of Right m -> pack . map show $ applyHints classify hint [m]