SQL encoding in Visual Studio

When we create stored procedures in Visual Studio (with the extension .sql), the file encoding is automatically set to "Unicode (UTF-8 with signature) - Codepage 65001".

This leads to problems with our DBAs, because their scripts do not like.

We have to manually enter and change them to "Western European (windows) - Codepage 1252".

This only happens since we upgraded to VS 2008 from 2005. Can someone explain what is happening and how to stop it?

+4
source share
3 answers

I think someone ran into a similar problem like yours and had the following workaround, posted in

http://connect.microsoft.com/VisualStudio/feedback/Workaround.aspx?FeedbackID=319830

+2
source

To summarize the link provided by Codeslayer (if the page URL changes) ...

Change sql file templates to ANSI encoding by opening it with notepad and then save it as an ANSI file. You can do the same for already created files. \ Common7 \ Tools \ Templates \ Database Objects

You just made our DBA very happy!

+3
source

For Visual Studio 2010, there is another set of files that need to be updated:

C: \ Program Files (x86) \ Microsoft Visual Studio 10.0 \ VSTSDB \ Extensions \ SqlServer \ Items

+2
source

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


All Articles