summaryrefslogtreecommitdiff
path: root/src/GF/Text
diff options
context:
space:
mode:
Diffstat (limited to 'src/GF/Text')
-rw-r--r--src/GF/Text/Coding.hs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/GF/Text/Coding.hs b/src/GF/Text/Coding.hs
new file mode 100644
index 000000000..47aaa5cb5
--- /dev/null
+++ b/src/GF/Text/Coding.hs
@@ -0,0 +1,14 @@
+module GF.Text.Coding where
+
+import GF.Text.UTF8
+import GF.Text.CP1251
+
+encodeUnicode e = case e of
+ "utf8" -> encodeUTF8
+ "cp1251" -> encodeCP1251
+ _ -> id
+
+decodeUnicode e = case e of
+ "utf8" -> decodeUTF8
+ "cp1251" -> decodeCP1251
+ _ -> id