Haskell “机舱安装投诉”&书信电报;内置>;:0:4:词法错误(UTF-8解码错误)";

Haskell “机舱安装投诉”&书信电报;内置>;:0:4:词法错误(UTF-8解码错误)";,haskell,windows-7,utf-8,cabal,Haskell,Windows 7,Utf 8,Cabal,我正在使用Windows7和区域设置zh_CN以及ghc-7.0.4 cmd.exe的默认代码页是936 > cabal install ghc-mod Resolving dependencies... Configuring ghc-syb-utils-0.2.1.0... Preprocessing library ghc-syb-utils-0.2.1.0... Building ghc-syb-utils-0.2.1.0... <built-in>:0:4: lex

我正在使用Windows7和区域设置zh_CN以及ghc-7.0.4

cmd.exe的默认代码页是936

> cabal install ghc-mod
Resolving dependencies...
Configuring ghc-syb-utils-0.2.1.0...
Preprocessing library ghc-syb-utils-0.2.1.0...
Building ghc-syb-utils-0.2.1.0...

<built-in>:0:4: lexical error (UTF-8 decoding error)
cabal: Error: some packages failed to install:
ghc-mod-1.10.7 depends on ghc-syb-utils-0.2.1.0 which failed to install.
ghc-syb-utils-0.2.1.0 failed during the building phase. The exception was:
ExitFailure 1
可以成功构建某些包:

xml-1.3.12
textmath-0.6.0.3
tagsoup-0.12.6

有些软件包可能会失败:


temporary-1.1.2.3
utf8-string-0.3.7
pandoc-types-1.9.0.2
json-0.5

我遇到了同样的问题。 我不知道原因是否相同,但试试看

set LANG=C

在你经营阴谋集团之前。在我的例子中,这解决了问题。

在我遇到类似的
UTF-8解码错误时对我起了作用,但是设置var的具体作用是什么?
set LANG=C