fix the handling of flag coding

This commit is contained in:
krasimir
2009-02-23 14:17:16 +00:00
parent ef8b8aa1a3
commit e647de7149
7 changed files with 44 additions and 39 deletions

View File

@@ -1,20 +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
"utf8" -> encodeUTF8
"cp1250" -> encodeCP1250
"cp1251" -> encodeCP1251
"cp1252" -> encodeCP1252
_ -> id
UTF_8 -> encodeUTF8
CP_1250 -> encodeCP1250
CP_1251 -> encodeCP1251
CP_1252 -> encodeCP1252
_ -> id
decodeUnicode e = case e of
"utf8" -> decodeUTF8
"cp1250" -> decodeCP1250
"cp1251" -> decodeCP1251
"cp1252" -> decodeCP1252
_ -> id
UTF_8 -> decodeUTF8
CP_1250 -> decodeCP1250
CP_1251 -> decodeCP1251
CP_1252 -> decodeCP1252
_ -> id