A simple batch file turns é into another character

I have a batch file with one line in it:

src/Filé.txt

When I run the batch file (either on the command line 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, operating program, or batch file.

He turned mine éin Θ! In addition, in another case, I turned into 8.

The file I'm trying to get does exist. In addition, if I try to use a simpler file name ( file.txt), it will open it without any problems. I have a 64-bit version of Windows 7. Any idea what is going on here?

+3
source share
1 answer

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 display the special characters correctly.

+1
source

Source: https://habr.com/ru/post/1767992/


All Articles