forked from GitHub/gf-core
do the cyrilic trick for Windows in gf3 also
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
{-# OPTIONS -cpp #-}
|
||||||
module Main where
|
module Main where
|
||||||
|
|
||||||
import GFC
|
import GFC
|
||||||
@@ -11,10 +12,19 @@ import Data.Version
|
|||||||
import System.Environment (getArgs)
|
import System.Environment (getArgs)
|
||||||
import System.Exit
|
import System.Exit
|
||||||
import System.IO
|
import System.IO
|
||||||
|
#ifdef mingw32_HOST_OS
|
||||||
|
import System.Win32.Console
|
||||||
|
import System.Win32.NLS
|
||||||
|
#endif
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main =
|
main = do
|
||||||
do args <- getArgs
|
#ifdef mingw32_HOST_OS
|
||||||
|
codepage <- getACP
|
||||||
|
setConsoleCP codepage
|
||||||
|
setConsoleOutputCP codepage
|
||||||
|
#endif
|
||||||
|
args <- getArgs
|
||||||
case parseOptions args of
|
case parseOptions args of
|
||||||
Ok (opts,files) -> mainOpts opts files
|
Ok (opts,files) -> mainOpts opts files
|
||||||
Bad err -> do hPutStrLn stderr err
|
Bad err -> do hPutStrLn stderr err
|
||||||
|
|||||||
Reference in New Issue
Block a user