批处理文件中的国际字符

发布于 2024-10-06 14:55:10 字数 189 浏览 1 评论 0原文

嘿,我在编写批处理文件时遇到一些问题,我需要指定一些包含国际字符(确切地说是挪威字母“ø”)的文件路径。

例如,文件名 axporteføljedb.vbp(在记事本中看起来很正常)在命令行上变成 axportef°ljedb.vbp,然后系统会继续抱怨没有找到。

有什么建议吗?

Hey, I'm having some problems writing a batch file where I need to specify some file paths containing international characters (the norwegian letter 'ø' to be exact).

For example, the filename axporteføljedb.vbp (which looks normal in notepad) turns into axportef°ljedb.vbp on the command line, which the system then goes on to complain about not finding.

Any suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

白云悠悠 2024-10-13 14:55:10

如果您将批处理文件保存为具有挪威字符集的 ANSI(例如使用 Notepad++),它将起作用。然后,在 cmd 中,当您想要运行批处理文件时,首先将代码页更改为支持挪威语的内容:chcp 1252(在控制台中)。

It will work if you save your batch file as ANSI with a Norwegian character set (with Notepad++ for example). Then, in the cmd, when you want to run your batch file, first change the code page to something that supports Norwegian: chcp 1252 (in the console).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文