Visual Studio inserts invalid characters in batch files

后端 未结 5 716
我在风中等你
我在风中等你 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:48

    What is happening is that VisualStudio is being clever and hiding you from the fact that your batch-file has been saved in a non-ASCII character encoding (e.g. your file is UTF-8 or some other non-ASCII encoding).

    My project team has been caught out a few times by this (if the files are checked into CVS it makes the files a mess).

    I tend to use Notepad++, look at the encoding on the lower-right (it should say that it is ANSI), if you need to change it go to the format menu and change the type then save.

    Visual Studio should look identical but the file size should have halved!

提交回复
热议问题