added mode 'gf --run' for running silently a script ; made quizzes handle character encoding correctly ; for this end, collected coding functions in GF.Text.Coding

This commit is contained in:
aarne
2008-10-01 16:01:51 +00:00
parent 81a93979ad
commit d53f8e0644
8 changed files with 93 additions and 52 deletions

14
src/GF/Text/Coding.hs Normal file
View File

@@ -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