From 02ec4e53297f5f847260eb6f3279cd6412e7027a Mon Sep 17 00:00:00 2001 From: krasimir Date: Thu, 4 Jun 2009 16:39:06 +0000 Subject: [PATCH] added decoding from UTF8 in MorphoService.hs --- src/server/MorphoService.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/MorphoService.hs b/src/server/MorphoService.hs index 15590b356..146ba2307 100644 --- a/src/server/MorphoService.hs +++ b/src/server/MorphoService.hs @@ -10,7 +10,7 @@ import GF.Text.UTF8 import Network.FastCGI import Text.JSON -import qualified Codec.Binary.UTF8.String as UTF8 (encodeString) +import qualified Codec.Binary.UTF8.String as UTF8 (decodeString, encodeString) import Data.ByteString.Char8 as BS import Control.Monad @@ -54,7 +54,7 @@ cgiMain sgr = where getTerm :: CGI String getTerm = do mt <- getInput "term" - maybe (throwCGIError 400 "No term given" ["No term given"]) (return . urlDecodeUnicode) mt + maybe (throwCGIError 400 "No term given" ["No term given"]) (return . urlDecodeUnicode . UTF8.decodeString) mt doEval :: Grammar -> String -> Err JSValue doEval sgr t = liftM termToJSValue $ eval sgr t