For Windows change the Console Code Page to the default ANSI code page. This fixes the problem with cyrilic.

This commit is contained in:
krasimir
2008-02-21 15:58:19 +00:00
parent 344d95293a
commit caad2dfe02
2 changed files with 13 additions and 1 deletions

View File

@@ -1,3 +1,4 @@
{-# OPTIONS -cpp #-}
----------------------------------------------------------------------
-- |
-- Module : Main
@@ -37,10 +38,21 @@ import System (getArgs,system,getEnv)
import Control.Monad (foldM,liftM)
import Data.List (nub)
#ifdef mingw32_HOST_OS
import System.Win32.Console
import System.Win32.NLS
#endif
-- AR 19/4/2000 -- 21/3/2006
main :: IO ()
main = do
#ifdef mingw32_HOST_OS
codepage <- getACP
setConsoleCP codepage
setConsoleOutputCP codepage
#endif
xs <- getArgs
let
(os,fs) = getOptions "-" xs