From a43ed0f99f372c9657a6e8be980f784d4a171bb7 Mon Sep 17 00:00:00 2001 From: bjorn Date: Mon, 15 Sep 2008 15:20:15 +0000 Subject: [PATCH] fastcgi server: decode UTF-8 inputs produced by the gwt client --- src/server/MainFastCGI.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/MainFastCGI.hs b/src/server/MainFastCGI.hs index f4b6a920f..a769e23e0 100644 --- a/src/server/MainFastCGI.hs +++ b/src/server/MainFastCGI.hs @@ -7,7 +7,7 @@ import URLEncoding import Network.CGI import Text.JSON -import qualified Codec.Binary.UTF8.String as UTF8 (encodeString) +import qualified Codec.Binary.UTF8.String as UTF8 (encodeString, decodeString) import Control.Monad import Data.Char @@ -42,7 +42,7 @@ cgiMain pgf = outputJSON json where getText :: CGI String - getText = liftM (maybe "" urlDecodeUnicode) $ getInput "input" + getText = liftM (maybe "" (urlDecodeUnicode . UTF8.decodeString)) $ getInput "input" getTree :: CGI PGF.Tree getTree = do mt <- getInput "tree"