mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-07-09 07:02:45 -06:00
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:
@@ -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
|
||||
Reference in New Issue
Block a user