ANSI / Unicode conflict in batch file

前端 未结 2 548
不思量自难忘°
不思量自难忘° 2021-01-25 14:15

I have some batch files that use a text file for language-independancy. Until yesterday all worked fine ... but then I began translating the standard texts to Dutch and German.

相关标签:
2条回答
  • 2021-01-25 14:30

    Your problem is that cmd uses code page 850 (in the US it may be 437), type chcp to see. English Windows uses 1252 elsewhere.

    GUI programs

    ñ 0xf1
    

    Console programs

    ñ 0xa4
    

    If you are on 32 bit use edit.exe (a msdos text editor). Else you can use Word and save as MSDos text.

    0 讨论(0)
  • 2021-01-25 14:42

    three years late, but...

    you can convert the file to ANSI "on the fly" with the type command:

    ...  %%a in ('type "%EnvPath%Text.txt"') do (
    
    0 讨论(0)
提交回复
热议问题