From 1ca54cca208876f83014119da55e747d5342b434 Mon Sep 17 00:00:00 2001 From: aarne Date: Wed, 28 Jan 2004 12:42:20 +0000 Subject: Unicode. Batch transl into HTML. --- src/GF/Shell/Commands.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/GF/Shell/Commands.hs') diff --git a/src/GF/Shell/Commands.hs b/src/GF/Shell/Commands.hs index e1c0736ab..32c496893 100644 --- a/src/GF/Shell/Commands.hs +++ b/src/GF/Shell/Commands.hs @@ -35,6 +35,7 @@ import Custom import qualified Ident as I import Option import Str (sstr) ---- +import UTF8 ---- import Random (mkStdGen, newStdGen) import Monad (liftM2, foldM) @@ -398,7 +399,8 @@ displaySStateIn env state = (tree',msg,menu) where ---- the Boolean is a temporary hack to have two parallel GUIs displaySStateJavaX :: Bool -> CEnv -> SState -> String -displaySStateJavaX isNew env state = unlines $ tagXML "gfedit" $ concat [ +displaySStateJavaX isNew env state = encodeUTF8 $ mkUnicode $ + unlines $ tagXML "gfedit" $ concat [ tagXML "linearizations" (concat [tagAttrXML "lin" ("lang", prLanguage lang) ss | (lang,ss) <- lins]), tagXML "tree" tree, @@ -414,7 +416,7 @@ displaySStateJavaX isNew env state = unlines $ tagXML "gfedit" $ concat [ opts = addOptions (optsSState state) -- state opts override (addOption (markLin mark) (globalOptions env)) lin (n,gr) = (n, map uni $ linearizeState noWrap opts gr zipper) where - uni = {- optEncodeUTF8 gr . -} mkUnicode + uni = optDecodeUTF8 gr exp = prprTree $ loc2tree zipper zipper = stateSState state linAll = map lin lgrs -- cgit v1.2.3