views:

223

answers:

1

After creating a batch file in visual studio, I get an error when I run it about invalid characters. Does anyone know the default character encoding for txt files?

+1  A: 

The default encoding for a text file in Visual Studio 2010 is UTF-8.

Therefore if you need to use ANSI I would recommend created the file outside of VS and then drag it to the project or add existing file to get it in the project. From their VS will respect the file encoding.

Rodney Foley
UTF-8 != Windows-1252.
Mark Tolonen
My mistake, removed the reference from answer. It doesn't change the answer from being correct though. :)
Rodney Foley
@Detroitpro question has been answered, did I miss something?
Rodney Foley