forked from GitHub/gf-core
Always use UTF8 encoding in the gf executable
This fixes many of the "Invalid character" messages you can get on different platforms. This has helped both with a nix-installation that didn't have global locale set and with a windows installation.
This commit is contained in:
@@ -16,6 +16,7 @@ import Data.Version
|
||||
import System.Directory
|
||||
import System.Environment (getArgs)
|
||||
import System.Exit
|
||||
import GHC.IO.Encoding
|
||||
-- import GF.System.Console (setConsoleEncoding)
|
||||
|
||||
-- | Run the GF main program, taking arguments from the command line.
|
||||
@@ -23,6 +24,7 @@ import System.Exit
|
||||
-- Run @gf --help@ for usage info.
|
||||
main :: IO ()
|
||||
main = do
|
||||
setLocaleEncoding utf8
|
||||
-- setConsoleEncoding
|
||||
uncurry mainOpts =<< getOptions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user