ghc 6.12.1, System.Environment.getArgs and UTF-8
문제
ghc 6.12 dropped separate utf8-string packages since most of its functionality is implemented in stock modules. In particular System.Environment.UTF8 does not exist anymore.
But the following does not work for me if an arg
is a non-ascii string:
import System.Environment
main = do
[arg] <- getArgs
putStrLn arg
I get some garbage at my terminal.
해결책
It is a bug, see
http://hackage.haskell.org/trac/ghc/ticket/3309
(I assume you mean System.Environment, not System.Environment.UTF8)
The workaround could be to cabal install utf8-sting and use System.Environment.UTF8
제휴하지 않습니다 StackOverflow