<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Finalint &#187; SQL</title>
	<atom:link href="http://www.finalint.com/category/technical/programming/sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.finalint.com</link>
	<description>So says Donnie Garvich</description>
	<lastBuildDate>Mon, 16 May 2011 18:43:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>SQL Management Studio&#8230; How NOT to save in Unicode format</title>
		<link>http://www.finalint.com/2006/11/14/sql-management-studio-how-not-to-save-in-unicode-format/</link>
		<comments>http://www.finalint.com/2006/11/14/sql-management-studio-how-not-to-save-in-unicode-format/#comments</comments>
		<pubDate>Tue, 14 Nov 2006 19:03:50 +0000</pubDate>
		<dc:creator>Donnie</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Management Studio]]></category>

		<guid isPermaLink="false">http://www.finalint.com/2006/11/14/sql-management-studio-how-not-to-save-in-unicode-format/</guid>
		<description><![CDATA[A project I work on requires that we developers edit stored procedures and store the resulting script in a text file that we put in our source control tool. In our case, we use Microsoft SQL Server Management Studio to do the aforementioned editing and we use CA&#8217;s Harvest Change Manager as the corporate mandated [...]]]></description>
			<content:encoded><![CDATA[<p>A project I work on requires that we developers edit stored procedures and store the resulting script in a text file that we put in our source control tool.  In our case, we use Microsoft SQL Server Management Studio to do the aforementioned editing and we use <a title="Harvest" href="http://www3.ca.com/solutions/Product.aspx?ID=255" target="_blank">CA&#8217;s Harvest Change Manager</a> as the corporate mandated code repository and source control tool.</p>
<p>Now if you were using another tool, Notepad or Query Analalyzer, for instance, you probably wouldn&#8217;t have the problem I&#8217;m going to outline.  As a matter of fact, the problem I&#8217;m going to outline is probably pretty rare.  But it exists and I found a solution, so I&#8217;m going to write about it.</p>
<p>As it turns out, whenever you &#8220;Save As&#8221; in Microsoft SQL Server Management Studio the default encoding for the file is Unicode &#8211; Codepage 1200.  Yes, this is a new approach to saving your beloved stored procedures and no, it wasn&#8217;t done that way in the past.  Further, I can&#8217;t find any notification that the &#8220;standard default&#8221; was going to be changing.</p>
<p>Anyway, Harvest doesn&#8217;t like Unicode files.  So when you go to add the file to your Harvest project it won&#8217;t let you.  Oh, the humanity!  ANSI for everyone!</p>
<p>Now I may be in the minority here, but I originally failed to notice that on the &#8220;Save File As&#8221; dialog there is a small arrow on the right side of the [Save] button.  Once I noticed it, I clicked it&#8230; Then I clicked &#8220;Save with encoding&#8230;&#8221;  Now I&#8217;m happy again!  Kind of&#8230;</p>
<p>The good thing is that this will let you save your file in whatever encoding you want.  The caveat is that it will let you save your file in <em>whatever</em> encoding you want.</p>
<p>So how is the default set?  I&#8217;ll leave that for another article&#8230;  Mostly because I don&#8217;t know yet.</p>
<p><em>Update (04.11.2008):  Thanks to Chris May for the following step by step instructions on how to overcome this issue (edited for formatting, the original version is comment #8):</em></p>
<blockquote><p>I have found some information about this.</p>
<p>Though it is possible at the time a script is saved to change the encoding to ascii it is tedious. Here is the process.</p>
<ol>
<li>Choose File\Save</li>
<li>Choose the name and folder to save the file then look really closely at the right edge of the “Save” button for a tiny arrow</li>
<li>Click that tiny Arrow and choose “Save with Encoding”</li>
<li>From the Drop list select the encoding you want (the default encoding is “Unicode &#8211; Codepage 1200″, which means “UTF-16″). I have been using “US-ASCII &#8211; Codepage 20127″</li>
<li>Hit OK and Save. Your files should now work just fine with Perforce, CVS, etc.</li>
</ol>
</blockquote>
<p><em>Additionally, Chris has <a href="https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=336750">voiced his feedback to the SQL team</a>, I encourage everyone to go have a look and hopefully we can get a solution sooner rather than later&#8230; although the outlook is bleak.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.finalint.com/2006/11/14/sql-management-studio-how-not-to-save-in-unicode-format/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
	</channel>
</rss>

