summaryrefslogtreecommitdiff
path: root/src/GF/Shell/Commands.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/GF/Shell/Commands.hs')
-rw-r--r--src/GF/Shell/Commands.hs6
1 files changed, 4 insertions, 2 deletions
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