Visual Studio inserts invalid characters in batch files

后端 未结 5 708
我在风中等你
我在风中等你 2020-12-13 08:05

I\'ve got some batch files that I use to help automate the process of creating and reloading development databases. It makes sense to create and maintain these batch files

5条回答
  •  不思量自难忘°
    2020-12-13 08:37

    Ray is correct when he says that Visual Studio's default format for text is something like UTF-8. Although Notepad++ is a great tool and I use it myself, there is an alternative in that you can tell Visual Studio to store your text file in ASCII format:

    In VS2008, select your file in the solution explorer and choose File...Save myfile.bat As...

    On the down arrow on the Save button, choose Save with Encoding.

    When saving in the Advanced Save Options dialog, Choose US-ASCII in the Encoding drop-down list. Set the line endings as required, or leave it as Current Setting.

提交回复
热议问题