Using non-ASCII characters in a cmd batch file

前端 未结 4 1389
小蘑菇
小蘑菇 2020-12-20 19:07

I\'m working on a .bat program, and the program is written in Finnish. The problem is that CMD doesn\'t know these \"special\" letters, such as Ä, Ö, Å.

4条回答
  •  爱一瞬间的悲伤
    2020-12-20 19:39

    If you use Notepad++, you can simply change the charset. Doing this will allow you to write letters from desired charset. The western region -US. should support it.

    You can do it in a drop down menu in Notepad++ or by hand by writing chcp 437. But I recommend doing this in Notepad++ as it will show you the output as it will be in the batch. So you will then easily see if you use the right code page. And at same time it's easy to switch if you want more special symbols. You can also as stated in previous posts. Try UTF-8.

    You can read more about this here: http://ss64.com/nt/chcp.html. And here's a list over different code pages (check out the OEM pages): Code Page Identifiers

提交回复
热议问题