diff options
| author | krasimir <krasimir@chalmers.se> | 2009-08-18 07:08:44 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2009-08-18 07:08:44 +0000 |
| commit | 3ee04cc42d0506641c4d8c6b2266972c20522811 (patch) | |
| tree | 140f59d770a0592ba8a56fe8bec4b43b434ec11e /src/GFI.hs | |
| parent | acb930a34915894543472b4e639148b7d7f895b0 (diff) | |
fix the unicode encoding problem with the cc command
Diffstat (limited to 'src/GFI.hs')
| -rw-r--r-- | src/GFI.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/GFI.hs b/src/GFI.hs index f183d043c..5093884d9 100644 --- a/src/GFI.hs +++ b/src/GFI.hs @@ -16,6 +16,7 @@ import GF.Infra.Option import GF.System.Readline import GF.Text.Coding +import GF.Compile.Coding import PGF import PGF.Data @@ -106,10 +107,10 @@ loop opts gfenv0 = do pOpts style q ("-qual" :ws) = pOpts style Qualified ws pOpts style q ws = (style,q,unwords ws) - (style,q,s) = pOpts TermPrintDefault Qualified ws + (style,q,s) = pOpts TermPrintDefault Qualified (tail (words s0)) case runP pExp (BS.pack s) of Left (_,msg) -> putStrLn msg - Right t -> case checkTerm sgr t >>= computeTerm sgr of + Right t -> case checkTerm sgr (codeTerm (decode gfenv) t) >>= computeTerm sgr of Ok x -> putStrLn $ enc (showTerm style q x) Bad s -> putStrLn $ enc s loopNewCPU gfenv |
