From f85232947e74ee7ef8c7b0ad2338212e7e68f1be Mon Sep 17 00:00:00 2001 From: krasimir Date: Sun, 13 Dec 2009 18:50:29 +0000 Subject: reorganize the directories under src, and rescue the JavaScript interpreter from deprecated --- src/compiler/GF/Text/Coding.hs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/compiler/GF/Text/Coding.hs (limited to 'src/compiler/GF/Text/Coding.hs') 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 -- cgit v1.2.3