在常规cmd.exe或cygwin termal上键入此命令会得到预期的结果:
$ ack hello
(我在PATH中有执行ack.pl的ack.bat )
然而,当我在Emacs中的shell或eshell中运行相同的命令时,它给出了这个错误:
c:\Users\Martin>"C:\cygwin\bin\perl" /cygdrive/c/Users/Martin/Desktop/ack.pl hello
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LC_ALL = (unset),
LANG = "ENU"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
我试图通过将SETENV的两个变量都设置为en_US.UTF-8来修复它,但是当我再次运行它时,它没有给我任何结果,只是冻结了。
更新:我终于找到了这个问题的解决方案。我所需要的就是将< NUL
添加到命令的末尾,因为它会将Linux style NULL设备解析为默认设备。
现在,如果我键入以下内容:
ack hello < NUL
它会给出我所期望的结果。
https://stackoverflow.com/questions/14283977
复制相似问题