Using non-ASCII characters in a cmd batch file

前端 未结 4 1394
小蘑菇
小蘑菇 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:27

    Try putting this line at the top of the batch file:

    chcp 65001
    

    It should change the console encoding to UTF-8, and you should be able to read the file properly in the script after that.

提交回复
热议问题