Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple Batch File Turns "é" into a Different Character

I have a batch file with a single line in it:

src/Filé.txt

When I run the batch file (either in the command prompt 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, operable program or batch file.

It turned my é into an Θ! I've also had it turn into an 8 on another occasion.

The file I'm trying to access does actually exist. Further, if I try it on a simpler file name (file.txt) it opens it without any problems. I'm running Windows 7 64 bit. Any idea what's going on here?

like image 728
Doctor Blue Avatar asked Jan 28 '26 20:01

Doctor Blue


1 Answers

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

like image 195
Rawns Avatar answered Feb 01 '26 05:02

Rawns