문제

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top