summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Text/Coding.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/GF/Text/Coding.hs')
-rw-r--r--src/compiler/GF/Text/Coding.hs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/compiler/GF/Text/Coding.hs b/src/compiler/GF/Text/Coding.hs
new file mode 100644
index 000000000..e3cd7b0ea
--- /dev/null
+++ b/src/compiler/GF/Text/Coding.hs
@@ -0,0 +1,21 @@
+module GF.Text.Coding where
+
+import GF.Infra.Option
+import GF.Text.UTF8
+import GF.Text.CP1250
+import GF.Text.CP1251
+import GF.Text.CP1252
+
+encodeUnicode e = case e of
+ UTF_8 -> encodeUTF8
+ CP_1250 -> encodeCP1250
+ CP_1251 -> encodeCP1251
+ CP_1252 -> encodeCP1252
+ _ -> id
+
+decodeUnicode e = case e of
+ UTF_8 -> decodeUTF8
+ CP_1250 -> decodeCP1250
+ CP_1251 -> decodeCP1251
+ CP_1252 -> decodeCP1252
+ _ -> id