diff options
Diffstat (limited to 'src-3.0/GF/Command/Commands.hs')
| -rw-r--r-- | src-3.0/GF/Command/Commands.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src-3.0/GF/Command/Commands.hs b/src-3.0/GF/Command/Commands.hs index 5514a0596..68e2c5526 100644 --- a/src-3.0/GF/Command/Commands.hs +++ b/src-3.0/GF/Command/Commands.hs @@ -497,7 +497,11 @@ allCommands pgf = Map.fromList [ (abstractName pgf ++ ": " ++ showTree t) : [lang ++ ": " ++ linear opts lang t | lang <- optLangs opts] - unlex opts lang = stringOps opts + unlex opts lang = stringOps (exceptUTF8 opts) where + exceptUTF8 = if isUTF8 then filter ((/="to_UTF8") . prOpt) else id + isUTF8 = case lookFlag pgf lang "coding" of + Just "utf8" -> True + _ -> False optRestricted opts = restrictPGF (hasLin pgf (mkCId (optLang opts))) pgf @@ -570,3 +574,5 @@ morphologyQuiz pgf ig cat = do infinity :: Int infinity = 256 +lookFlag :: PGF -> String -> String -> Maybe String +lookFlag pgf lang flag = lookConcrFlag pgf (mkCId lang) (mkCId flag) |
