summaryrefslogtreecommitdiff
path: root/src/GF.hs
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2008-02-21 15:58:19 +0000
committerkrasimir <krasimir@chalmers.se>2008-02-21 15:58:19 +0000
commit389ba6058d336e4f193fa02c1fad3edad67415c1 (patch)
tree44e10f5bc2b4827adf4f1f2f1a7a0995f96f750e /src/GF.hs
parent671b6b4dff42efeef8c1e1471576f06fdcff8f68 (diff)
For Windows change the Console Code Page to the default ANSI code page. This fixes the problem with cyrilic.
Diffstat (limited to 'src/GF.hs')
-rw-r--r--src/GF.hs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/GF.hs b/src/GF.hs
index 006d5f0df..1d2651767 100644
--- a/src/GF.hs
+++ b/src/GF.hs
@@ -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