这个问题基本上说明了问题。
我正在使用 Windows XP Pro Service Pack 3
ComSpec=C:\WINDOWS\system32\cmd.exe
我通过 Start... Run-dialog... cmd.exe 启动了控制台
这是我的控制台的“视图”:
命令,然后是输出(以及我的 // 注释)
C:\> chcp 850
Active code page: 850
// output is as expected
C:\> echo @chcp ^& REM 850>test850.cmd
// no output; as ecpected)
C:\> type test850.cmd
@chcp & REM 850
// output is as expected
C:\> call test850.cmd
Active code page: 850
// output is as expected
以上工作正常(如预期)。Windows 领域的事情很开心,但是当我切换到代码页 65001 时“调用”失败
C:\> chcp 65001
Active code page: 65001
// output is as expected
C:\> echo @chcp ^& REM 65001>test65001.cmd
// no output; as ecpected
C:\> type test65001.cmd
@chcp & REM 65001
// output is as expected
C:\> call test65001.cmd
// NO OUTPUT, NO ERROR, NO ANYTHING, NADA... other than frustration :)
这里发生了什么(没有发生)?