Reputation: 10022
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 causes ours DBA's problems as their scripts don't like it.
We have to manually go in and change them to 'Western European (windows) - Codepage 1252'.
This only seems to be happening since we upgraded to VS 2008 from 2005. Can anyone explain whats going on and how to stop it?
Upvotes: 6
Views: 6617
Reputation: 1233
For Visual Studio 2010, there is another set of files you need to update:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VSTSDB\Extensions\SqlServer\Items
Upvotes: 2
Reputation: 10022
To summarise the link provided by Codeslayer (in case the page url changes)...
Change the sql file templates to ANSI encoding by opening with notepad and then saving it as an ANSI file. You can do the same for files already created. \Common7\Tools\Templates\Database Project Items
You've just made our DBA's very happy!
Upvotes: 5
Reputation: 3393
I think somebody faced a similar problem like yours and had the following workaround which is posted at
http://connect.microsoft.com/VisualStudio/feedback/Workaround.aspx?FeedbackID=319830
Upvotes: 3