1
0
forked from GitHub/gf-core

the shell now supports cp1251 coding with se command. works with the word completion as well

This commit is contained in:
krasimir
2008-06-27 10:33:46 +00:00
parent 5c713d8f02
commit 60c2d054ee
4 changed files with 36 additions and 31 deletions

View File

@@ -3,6 +3,7 @@ module GF.Compile.Coding where
import GF.Grammar.Grammar
import GF.Grammar.Macros
import GF.Text.UTF8
import GF.Text.CP1251
import GF.Infra.Modules
import GF.Infra.Option
import GF.Data.Operations
@@ -47,9 +48,3 @@ codeSourceModule co (id,moi) = case moi of
PSeq p q -> PSeq (codp p) (codp q)
PAlt p q -> PAlt (codp p) (codp q)
_ -> p
---- from Text.Lexing
decodeCP1251 = map convert where
convert c
| c >= '\192' && c <= '\255' = chr (ord c + 848)
| otherwise = c