SQL Server Development Bookmark and Share   
 index > SQL Server Tools General > SQL Server Management Studio - File Encoding
 

SQL Server Management Studio - File Encoding

I have been searching the forums for this issue and I haven't found anything on it so I apologize in advance if this issue has already been covered. My eyes are droopy and the coffee supply is low.

Is there a way to always save a file as UTF-8 or ANSI in SQL Server Management Studio? In analyzer you could save as ANSI, etc.

- d
sqlduck  Tuesday, October 31, 2006 10:48 PM

Yep, that's possible:

1) Open the script
2) File > Save As...
3) Click on the little arrow on the right of the "Save" button
4) Select "Save with Encoding..."
5) Choose your encoding. Several varieties of UNICODE, double-width UNICODE, and a bunch of "single-byte" formats are available.

Hope this helps,
Steve

Steven Twitchell - MSFT  Wednesday, November 01, 2006 7:21 PM

Yep, that's possible:

1) Open the script
2) File > Save As...
3) Click on the little arrow on the right of the "Save" button
4) Select "Save with Encoding..."
5) Choose your encoding. Several varieties of UNICODE, double-width UNICODE, and a bunch of "single-byte" formats are available.

Hope this helps,
Steve

Steven Twitchell - MSFT  Wednesday, November 01, 2006 7:21 PM
Excellent, thank you.
sqlduck  Thursday, November 02, 2006 3:57 PM

Is there a way to make this the default save option?

Our source control doesnt handle unicode files very well and its a real pain to remember to change the default save option every time

anthony_brown  Thursday, November 02, 2006 5:05 PM
Hi,

Originally I thought that my settings were saved, but once I opened mgt. studio again, I had to select the encoding again. This is annoying. If there is a setting somewhere that we can change to keep the encoding we choose as the default it would really help.

- d
sqlduck  Thursday, November 02, 2006 6:57 PM

That's very useful feedback. Could you please file a suggestion on http://connect.microsoft.com/SqlServer?

The product teams use customer feedback to help prioritize future work. Filing the suggestion on the Connect site does two things: First, it ensures that your suggestion goes directly into our internal issue tracking system and we don't lose any information. Second, suggestions from customers carry more weight than those proposed by employees, so filing suggestions on Connect can have a bigger impact on future improvements.

Thanks,
Steve

Steven Twitchell - MSFT  Thursday, November 02, 2006 10:33 PM

I also need this feature!

I will register as well.

Charlie.

Transact Charlie  Tuesday, February 26, 2008 2:40 PM
I have also been hampered by this issue. I am glad to finally find this information. I did not see a feedback about setting the default encoding for the saving of SQL scripts, so I posted one myself.
Chris May  Thursday, April 03, 2008 3:54 PM

You can use google to search for other answers

Custom Search

More Threads

• Error when trying to schedule a maintenance plan
• Registering a SQL Server Using Windows Authentication
• Why is SQLCMD Not Accessable?
• Error Sending Database Mail from SQL Server 2005 using SMTP server
• RML utilities Command Line
• Automatic generation of a dataset schema from resulsets
• Error in new SQL2K5 Performance Dashboard Reports
• SQL Profiler
• Connection Link Failure between Application and SQL Server 2005
• alter column