mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-22 19:22:50 -06:00
uniform encoding: gfo and pgf in UTF8, internal in unicode
This commit is contained in:
@@ -58,5 +58,5 @@ outputConcr pgf = case cncnames pgf of
|
||||
cnc:_ -> cnc
|
||||
|
||||
printPGF :: PGF -> String
|
||||
printPGF = ---- encodeUTF8 . -- out by AR26/6/2008: the PGF may already be UTF8
|
||||
printPGF = -- encodeUTF8 . -- fromPGF does UTF8 encoding
|
||||
printTree . fromPGF
|
||||
|
||||
@@ -97,8 +97,10 @@ canon2gfcc opts pars cgr@(M.MGrammar ((a,M.ModMod abm):cms)) =
|
||||
js = tree2list (M.jments mo)
|
||||
flags = Map.fromList [(mkCId f,x) | (f,x) <- moduleOptionsGFO (M.flags mo)]
|
||||
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
|
||||
utf = id -- trace (show lang0 +++ show flags) $
|
||||
-- if moduleFlag optEncoding (moduleOptions (M.flags mo)) == UTF_8
|
||||
-- then id else id
|
||||
---- then (trace "decode" D.convertStringsInTerm decodeUTF8) else id
|
||||
umkTerm = utf . mkTerm
|
||||
lins = Map.fromAscList
|
||||
[(i2i f, umkTerm tr) | (f,CncFun _ (Yes tr) _) <- js]
|
||||
|
||||
Reference in New Issue
Block a user