diff options
| author | aarne <aarne@cs.chalmers.se> | 2008-06-26 06:52:01 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2008-06-26 06:52:01 +0000 |
| commit | f7622321de4e3fe7acee646a0fb8a817576621c3 (patch) | |
| tree | ae7ff69fb86657657b3c5c01f783aec94af2d294 /src/GF/Compile | |
| parent | 313ef2908d323269fdcaf676f157dc315fef5272 (diff) | |
utf8 adjustments
Diffstat (limited to 'src/GF/Compile')
| -rw-r--r-- | src/GF/Compile/Export.hs | 3 | ||||
| -rw-r--r-- | src/GF/Compile/GrammarToGFCC.hs | 9 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/GF/Compile/Export.hs b/src/GF/Compile/Export.hs index 9e9a99e99..23b8198f8 100644 --- a/src/GF/Compile/Export.hs +++ b/src/GF/Compile/Export.hs @@ -58,4 +58,5 @@ outputConcr pgf = case cncnames pgf of cnc:_ -> cnc printPGF :: PGF -> String -printPGF = encodeUTF8 . printTree . fromPGF +printPGF = ---- encodeUTF8 . -- out by AR26/6/2008: the PGF may already be UTF8 + printTree . fromPGF diff --git a/src/GF/Compile/GrammarToGFCC.hs b/src/GF/Compile/GrammarToGFCC.hs index d14a914f1..e13c8edf2 100644 --- a/src/GF/Compile/GrammarToGFCC.hs +++ b/src/GF/Compile/GrammarToGFCC.hs @@ -99,15 +99,16 @@ canon2gfcc opts pars cgr@(M.MGrammar ((a,M.ModMod abm):cms)) = opers = Map.fromAscList [] -- opers will be created as optimization utf = if moduleFlag optEncoding (moduleOptions (M.flags mo)) == UTF_8 then D.convertStringsInTerm decodeUTF8 else id + umkTerm = utf . mkTerm lins = Map.fromAscList - [(i2i f, utf (mkTerm tr)) | (f,CncFun _ (Yes tr) _) <- js] + [(i2i f, umkTerm tr) | (f,CncFun _ (Yes tr) _) <- js] lincats = Map.fromAscList [(i2i c, mkCType ty) | (c,CncCat (Yes ty) _ _) <- js] lindefs = Map.fromAscList - [(i2i c, mkTerm tr) | (c,CncCat _ (Yes tr) _) <- js] + [(i2i c, umkTerm tr) | (c,CncCat _ (Yes tr) _) <- js] printnames = Map.union - (Map.fromAscList [(i2i f, mkTerm tr) | (f,CncFun _ _ (Yes tr)) <- js]) - (Map.fromAscList [(i2i f, mkTerm tr) | (f,CncCat _ _ (Yes tr)) <- js]) + (Map.fromAscList [(i2i f, umkTerm tr) | (f,CncFun _ _ (Yes tr)) <- js]) + (Map.fromAscList [(i2i f, umkTerm tr) | (f,CncCat _ _ (Yes tr)) <- js]) params = Map.fromAscList [(i2i c, pars lang0 c) | (c,CncCat (Yes ty) _ _) <- js] fcfg = Nothing |
