From aa94e340980f715b8d20e6cbc60d989b5c59e6b5 Mon Sep 17 00:00:00 2001 From: aarne Date: Tue, 11 Mar 2008 14:37:10 +0000 Subject: coding flag as pragma in files --- src/GF/Compile/GetGrammar.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/GF/Compile/GetGrammar.hs') diff --git a/src/GF/Compile/GetGrammar.hs b/src/GF/Compile/GetGrammar.hs index d9afc9546..2b908bd81 100644 --- a/src/GF/Compile/GetGrammar.hs +++ b/src/GF/Compile/GetGrammar.hs @@ -29,6 +29,7 @@ import qualified GF.Source.AbsGF as A import GF.Source.SourceToGrammar ---- import Macros ---- import Rename +import GF.Text.UTF8 ---- import GF.Infra.Option --- import Custom import GF.Source.ParGF @@ -56,7 +57,10 @@ getSourceModule opts file0 = do -- ioeIO $ putStrLn $ "preproc" +++ cmd return tmp _ -> return file0 - string <- readFileIOE file + string0 <- readFileIOE file + let string = case getOptVal opts uniCoding of + Just "utf8" -> decodeUTF8 string0 + _ -> string0 let tokens = myLexer string mo1 <- ioeErr $ {- err2err $ -} pModDef tokens ioeErr $ transModDef mo1 -- cgit v1.2.3