mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 11:42:49 -06:00
For Windows change the Console Code Page to the default ANSI code page. This fixes the problem with cyrilic.
This commit is contained in:
12
src/GF.hs
12
src/GF.hs
@@ -1,3 +1,4 @@
|
|||||||
|
{-# OPTIONS -cpp #-}
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
-- |
|
-- |
|
||||||
-- Module : Main
|
-- Module : Main
|
||||||
@@ -37,10 +38,21 @@ import System (getArgs,system,getEnv)
|
|||||||
import Control.Monad (foldM,liftM)
|
import Control.Monad (foldM,liftM)
|
||||||
import Data.List (nub)
|
import Data.List (nub)
|
||||||
|
|
||||||
|
#ifdef mingw32_HOST_OS
|
||||||
|
import System.Win32.Console
|
||||||
|
import System.Win32.NLS
|
||||||
|
#endif
|
||||||
|
|
||||||
-- AR 19/4/2000 -- 21/3/2006
|
-- AR 19/4/2000 -- 21/3/2006
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = do
|
main = do
|
||||||
|
#ifdef mingw32_HOST_OS
|
||||||
|
codepage <- getACP
|
||||||
|
setConsoleCP codepage
|
||||||
|
setConsoleOutputCP codepage
|
||||||
|
#endif
|
||||||
|
|
||||||
xs <- getArgs
|
xs <- getArgs
|
||||||
let
|
let
|
||||||
(os,fs) = getOptions "-" xs
|
(os,fs) = getOptions "-" xs
|
||||||
|
|||||||
@@ -717,7 +717,7 @@ txtHelpFile =
|
|||||||
"\n-coding, Some grammars are in UTF-8, some in isolatin-1." ++
|
"\n-coding, Some grammars are in UTF-8, some in isolatin-1." ++
|
||||||
"\n If the letters \228 (a-umlaut) and \246 (o-umlaut) look strange, either" ++
|
"\n If the letters \228 (a-umlaut) and \246 (o-umlaut) look strange, either" ++
|
||||||
"\n change your terminal to isolatin-1, or rewrite the grammar with" ++
|
"\n change your terminal to isolatin-1, or rewrite the grammar with" ++
|
||||||
"\n 'pg -utf8'." ++
|
"\n 'pg -utf8'. For Windows you also may have to change your font to TrueType." ++
|
||||||
"\n" ++
|
"\n" ++
|
||||||
"\n-- *: Commands and options marked with * are not currently implemented." ++
|
"\n-- *: Commands and options marked with * are not currently implemented." ++
|
||||||
[]
|
[]
|
||||||
|
|||||||
Reference in New Issue
Block a user