简单的批处理文件变成“”“”变成不同的角色
我有一个包含一行的批处理文件:
src/Filé.txt
当我运行该批处理文件(在命令提示符中或在 Windows 资源管理器中单击它)时,我得到以下内容:
C:>src\FilThe.txt
“src\FilThe.txt”未被识别为内部或外部命令、可操作程序或批处理文件。
它将我的 é
变成了 θ
!我还曾在其他场合将其变成 8
。
我尝试访问的文件确实存在。此外,如果我尝试使用更简单的文件名(file.txt
),它可以毫无问题地打开它。我运行的是 Windows 7 64 位。知道这是怎么回事吗?
I have a batch file with a single line in it:
src/Filé.txt
When I run the batch file (either in the command prompt or by clicking it in Windows Explorer), I get the following:
C:>src\FilΘ.txt
'src\FilΘ.txt' is not recognized as an internal or external command, operable program or batch file.
It turned my é
into an Θ
! I've also had it turn into an 8
on another occasion.
The file I'm trying to access does actually exist. Further, if I try it on a simpler file name (file.txt
) it opens it without any problems. I'm running Windows 7 64 bit. Any idea what's going on here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该能够编辑批处理文件并将以下行添加到文件的最顶部:
CHCP 65001
这会将字符集设置为 UTF-8 并且应正确显示特殊字符。
You should be able to edit the batch file and add the following line to the very top of the file:
CHCP 65001
This will set the character set to UTF-8 and should display special characters correctly.