summaryrefslogtreecommitdiff
path: root/src-3.0/GF/Infra
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-06-24 13:58:04 +0000
committeraarne <aarne@cs.chalmers.se>2008-06-24 13:58:04 +0000
commit239f310eb560763c215400a41af7e21fa0f2d51f (patch)
treeafad2f258975e34b40e2e60ead2436ef98c38411 /src-3.0/GF/Infra
parent223480bb77d5a86f3a9dcb2f02fcafbd89de453a (diff)
cp1251 coding ; trying to recognize the coding flag in grammar
Diffstat (limited to 'src-3.0/GF/Infra')
-rw-r--r--src-3.0/GF/Infra/Option.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src-3.0/GF/Infra/Option.hs b/src-3.0/GF/Infra/Option.hs
index 44d4adfa5..6c9d3550b 100644
--- a/src-3.0/GF/Infra/Option.hs
+++ b/src-3.0/GF/Infra/Option.hs
@@ -76,7 +76,7 @@ data Verbosity = Quiet | Normal | Verbose | Debug
data Phase = Preproc | Convert | Compile | Link
deriving (Show,Eq,Ord)
-data Encoding = UTF_8 | ISO_8859_1
+data Encoding = UTF_8 | ISO_8859_1 | CP_1251
deriving (Show,Eq,Ord)
data OutputFormat = FmtPGF
@@ -469,7 +469,9 @@ optimizationPackages =
encodings :: [(String,Encoding)]
encodings =
[("utf8", UTF_8),
- ("latin1", ISO_8859_1)]
+ ("cp1251", CP_1251),
+ ("latin1", ISO_8859_1)
+ ]
lookupShow :: Eq a => [(String,a)] -> a -> String
lookupShow xs z = fromMaybe "lookupShow" $ lookup z [(y,x) | (x,y) <- xs]
@@ -542,4 +544,4 @@ instance Functor OptDescr where
instance Functor ArgDescr where
fmap f (NoArg x) = NoArg (f x)
fmap f (ReqArg g s) = ReqArg (f . g) s
- fmap f (OptArg g s) = OptArg (f . g) s \ No newline at end of file
+ fmap f (OptArg g s) = OptArg (f . g) s