summaryrefslogtreecommitdiff
path: root/src/GF/API.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/GF/API.hs')
-rw-r--r--src/GF/API.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/GF/API.hs b/src/GF/API.hs
index 7053a1b67..7c708c933 100644
--- a/src/GF/API.hs
+++ b/src/GF/API.hs
@@ -304,3 +304,8 @@ optEncodeUTF8 gr = case getOptVal (stateOptions gr) uniCoding of
Just "utf8" -> id
_ -> encodeUTF8
+optDecodeUTF8 :: GFGrammar -> String -> String
+optDecodeUTF8 gr = case getOptVal (stateOptions gr) uniCoding of
+ Just "utf8" -> decodeUTF8
+ _ -> id
+