<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: SQL Management Studio&#8230; How NOT to save in Unicode format</title>
	<atom:link href="http://www.finalint.com/2006/11/14/sql-management-studio-how-not-to-save-in-unicode-format/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.finalint.com/2006/11/14/sql-management-studio-how-not-to-save-in-unicode-format/</link>
	<description>So says Donnie Garvich</description>
	<lastBuildDate>Thu, 24 Nov 2011 16:20:10 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Kevin</title>
		<link>http://www.finalint.com/2006/11/14/sql-management-studio-how-not-to-save-in-unicode-format/comment-page-1/#comment-946</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Sat, 28 May 2011 01:29:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.finalint.com/2006/11/14/sql-management-studio-how-not-to-save-in-unicode-format/#comment-946</guid>
		<description>This is not a rare problem at all.  Only people who never try to access these files outside the confined studio env won&#039;t be hitting the froblem.  Anyone who uses other tools (including many Microsoft tools) to search (e.g. grep) or diff such source files would have this problem.

Microsoft in their typical non-interoperable way picks a default that doesn&#039;t make much sense, not just for other environments, but doesn&#039;t make sense, period.

For starters, calling UTF-16 &#039;Unicode&#039; is wrong.  The Microsoft encoding default is UTF-16 which is one specific form of Unicode.  UTF-8 is also Unicode, see: http://en.wikipedia.org/wiki/UTF-8.  Ironically, UTF-8 is much more compatible with ASCII so it would be a much more sensible default to pick.

The problem with the default Microsoft encoding is that for most cases (English text) every other byte in the UTF-16 encoded file is a null (ASCII 0) byte.  This makes these *.sql files both 2 times larger for no reason and non trivial to search, diff, edit with other standard tools.

Yet another Microsoft bad design decision.</description>
		<content:encoded><![CDATA[<p>This is not a rare problem at all.  Only people who never try to access these files outside the confined studio env won&#8217;t be hitting the froblem.  Anyone who uses other tools (including many Microsoft tools) to search (e.g. grep) or diff such source files would have this problem.</p>
<p>Microsoft in their typical non-interoperable way picks a default that doesn&#8217;t make much sense, not just for other environments, but doesn&#8217;t make sense, period.</p>
<p>For starters, calling UTF-16 &#8216;Unicode&#8217; is wrong.  The Microsoft encoding default is UTF-16 which is one specific form of Unicode.  UTF-8 is also Unicode, see: <a href="http://en.wikipedia.org/wiki/UTF-8" rel="nofollow">http://en.wikipedia.org/wiki/UTF-8</a>.  Ironically, UTF-8 is much more compatible with ASCII so it would be a much more sensible default to pick.</p>
<p>The problem with the default Microsoft encoding is that for most cases (English text) every other byte in the UTF-16 encoded file is a null (ASCII 0) byte.  This makes these *.sql files both 2 times larger for no reason and non trivial to search, diff, edit with other standard tools.</p>
<p>Yet another Microsoft bad design decision.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonas Porter</title>
		<link>http://www.finalint.com/2006/11/14/sql-management-studio-how-not-to-save-in-unicode-format/comment-page-1/#comment-628</link>
		<dc:creator>Jonas Porter</dc:creator>
		<pubDate>Tue, 27 Apr 2010 18:47:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.finalint.com/2006/11/14/sql-management-studio-how-not-to-save-in-unicode-format/#comment-628</guid>
		<description>Man, that&#039;s a tricky &#039;Save as&#039; button. Thanks for the information.</description>
		<content:encoded><![CDATA[<p>Man, that&#8217;s a tricky &#8216;Save as&#8217; button. Thanks for the information.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kelly</title>
		<link>http://www.finalint.com/2006/11/14/sql-management-studio-how-not-to-save-in-unicode-format/comment-page-1/#comment-190</link>
		<dc:creator>Kelly</dc:creator>
		<pubDate>Wed, 19 Aug 2009 10:35:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.finalint.com/2006/11/14/sql-management-studio-how-not-to-save-in-unicode-format/#comment-190</guid>
		<description>I&#039;ve never written a SQL add-in before and I think it would be really silly to write an add-in to replace the editor, but since MS have not given us the ability to hook the save event in the editor, nor the ability to set the default encoding for the editor, this may be the only way to get the type of behaviour desired.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve never written a SQL add-in before and I think it would be really silly to write an add-in to replace the editor, but since MS have not given us the ability to hook the save event in the editor, nor the ability to set the default encoding for the editor, this may be the only way to get the type of behaviour desired.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TW Burger</title>
		<link>http://www.finalint.com/2006/11/14/sql-management-studio-how-not-to-save-in-unicode-format/comment-page-1/#comment-181</link>
		<dc:creator>TW Burger</dc:creator>
		<pubDate>Tue, 28 Jul 2009 23:52:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.finalint.com/2006/11/14/sql-management-studio-how-not-to-save-in-unicode-format/#comment-181</guid>
		<description>Thanks Chris,

If Microsoft can do anything in a more difficult, counterproductive, undocumented, hard to find manner - they will.

I can sort of understand saving in Unicode as a default, but why won&#039;t Excel read the Unicode correctly and separate the values a it would with an ASCII file? Sheesh!</description>
		<content:encoded><![CDATA[<p>Thanks Chris,</p>
<p>If Microsoft can do anything in a more difficult, counterproductive, undocumented, hard to find manner &#8211; they will.</p>
<p>I can sort of understand saving in Unicode as a default, but why won&#8217;t Excel read the Unicode correctly and separate the values a it would with an ASCII file? Sheesh!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yakov</title>
		<link>http://www.finalint.com/2006/11/14/sql-management-studio-how-not-to-save-in-unicode-format/comment-page-1/#comment-175</link>
		<dc:creator>Yakov</dc:creator>
		<pubDate>Tue, 05 May 2009 22:35:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.finalint.com/2006/11/14/sql-management-studio-how-not-to-save-in-unicode-format/#comment-175</guid>
		<description>Besides, Unicode makes it impossible to search for files with find/grep!</description>
		<content:encoded><![CDATA[<p>Besides, Unicode makes it impossible to search for files with find/grep!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PH</title>
		<link>http://www.finalint.com/2006/11/14/sql-management-studio-how-not-to-save-in-unicode-format/comment-page-1/#comment-173</link>
		<dc:creator>PH</dc:creator>
		<pubDate>Mon, 27 Apr 2009 18:29:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.finalint.com/2006/11/14/sql-management-studio-how-not-to-save-in-unicode-format/#comment-173</guid>
		<description>Just keeping the conversation alive.  We have the EXACT same problem, and the feedback you posted is still classified as &quot;Active&quot;.  I have the sneaking suspicion that M$ won&#039;t do anything to &quot;correct&quot; this because it would result in making their product work with competitors&#039; source repository solutions.  I hate Harvest, but I have to use it.</description>
		<content:encoded><![CDATA[<p>Just keeping the conversation alive.  We have the EXACT same problem, and the feedback you posted is still classified as &#8220;Active&#8221;.  I have the sneaking suspicion that M$ won&#8217;t do anything to &#8220;correct&#8221; this because it would result in making their product work with competitors&#8217; source repository solutions.  I hate Harvest, but I have to use it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JH</title>
		<link>http://www.finalint.com/2006/11/14/sql-management-studio-how-not-to-save-in-unicode-format/comment-page-1/#comment-158</link>
		<dc:creator>JH</dc:creator>
		<pubDate>Fri, 21 Nov 2008 11:04:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.finalint.com/2006/11/14/sql-management-studio-how-not-to-save-in-unicode-format/#comment-158</guid>
		<description>Hi,

I&#039;ve had exactly same problem and your solution works... a bit.
The trouble is our database uses Czech collation &amp; czech encoding, but when I chose ANSI in Save As dialog, I get questionmarks all over the data, replacing anything that&#039;s not pure 7bit. Unicode is not really an option because of applications that use exported files and Chinese doesn&#039;t work either.

Any ideas, how to get any othe codepage to the list?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I&#8217;ve had exactly same problem and your solution works&#8230; a bit.<br />
The trouble is our database uses Czech collation &amp; czech encoding, but when I chose ANSI in Save As dialog, I get questionmarks all over the data, replacing anything that&#8217;s not pure 7bit. Unicode is not really an option because of applications that use exported files and Chinese doesn&#8217;t work either.</p>
<p>Any ideas, how to get any othe codepage to the list?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DG</title>
		<link>http://www.finalint.com/2006/11/14/sql-management-studio-how-not-to-save-in-unicode-format/comment-page-1/#comment-52</link>
		<dc:creator>DG</dc:creator>
		<pubDate>Fri, 11 Apr 2008 19:32:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.finalint.com/2006/11/14/sql-management-studio-how-not-to-save-in-unicode-format/#comment-52</guid>
		<description>Thanks Chris!

I added your step by step instructions to the post as well as your link to the SQL feedback post.  Hopefully it will help someone who *gasp* is developing SQL scripts in a team environment */gasp* get their code into source control and functional.

With Microsoft&#039;s supposed focus on making their tools developer-centric over the past 5 years (with the tools we have now as the result of that initiative, anyone remember Ballmer&#039;s &quot;Developers, developers, developers, developers&quot; scene?) it surprises me that they aren&#039;t taking a more pro-active approach to making sure team development is possible and intuitive.</description>
		<content:encoded><![CDATA[<p>Thanks Chris!</p>
<p>I added your step by step instructions to the post as well as your link to the SQL feedback post.  Hopefully it will help someone who *gasp* is developing SQL scripts in a team environment */gasp* get their code into source control and functional.</p>
<p>With Microsoft&#8217;s supposed focus on making their tools developer-centric over the past 5 years (with the tools we have now as the result of that initiative, anyone remember Ballmer&#8217;s &#8220;Developers, developers, developers, developers&#8221; scene?) it surprises me that they aren&#8217;t taking a more pro-active approach to making sure team development is possible and intuitive.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris May</title>
		<link>http://www.finalint.com/2006/11/14/sql-management-studio-how-not-to-save-in-unicode-format/comment-page-1/#comment-50</link>
		<dc:creator>Chris May</dc:creator>
		<pubDate>Fri, 04 Apr 2008 01:18:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.finalint.com/2006/11/14/sql-management-studio-how-not-to-save-in-unicode-format/#comment-50</guid>
		<description>I have found some information about this. 
Though it is possible at the time a script is saved to change the encoding to ascii it is tedious. Here is the process. 
1) Choose File\Save ... As
2) Choose the name and folder to save the file then look really closely at the right edge of the &quot;Save&quot; button for a tiny arrow.
3) Click that tiny Arrow and choose &quot;Save with Encoding&quot;
4) From the Drop list select the encoding you want (the default encoding is &quot;Unicode - Codepage 1200&quot;, which means &quot;UTF-16&quot;). I have been using &quot;US-ASCII - Codepage 20127&quot;.
5) Hit OK and Save. Your files should now work just fine with Perforce, CVS, etc.

There is not currently (or as far as I know planned) a way to change the default encoding for these files, but I have submitted a feedback to the SQL team and would request anyone affected by this issue to add their voice so M$ knows how important this is. Here is the URL of my feedback: 
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=336750</description>
		<content:encoded><![CDATA[<p>I have found some information about this.<br />
Though it is possible at the time a script is saved to change the encoding to ascii it is tedious. Here is the process.<br />
1) Choose File\Save &#8230; As<br />
2) Choose the name and folder to save the file then look really closely at the right edge of the &#8220;Save&#8221; button for a tiny arrow.<br />
3) Click that tiny Arrow and choose &#8220;Save with Encoding&#8221;<br />
4) From the Drop list select the encoding you want (the default encoding is &#8220;Unicode &#8211; Codepage 1200&#8243;, which means &#8220;UTF-16&#8243;). I have been using &#8220;US-ASCII &#8211; Codepage 20127&#8243;.<br />
5) Hit OK and Save. Your files should now work just fine with Perforce, CVS, etc.</p>
<p>There is not currently (or as far as I know planned) a way to change the default encoding for these files, but I have submitted a feedback to the SQL team and would request anyone affected by this issue to add their voice so M$ knows how important this is. Here is the URL of my feedback:<br />
<a href="https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=336750" rel="nofollow">https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=336750</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MDS</title>
		<link>http://www.finalint.com/2006/11/14/sql-management-studio-how-not-to-save-in-unicode-format/comment-page-1/#comment-45</link>
		<dc:creator>MDS</dc:creator>
		<pubDate>Thu, 14 Feb 2008 16:40:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.finalint.com/2006/11/14/sql-management-studio-how-not-to-save-in-unicode-format/#comment-45</guid>
		<description>This is also a problem with Microsoft&#039;s legacy systems.  We&#039;re still using -ugh- visual source safe (VSS).  VSS saves unicode files as binary.  One only realizes there is a problem after running a VSS comparison of the two files.  VSS comparisons of binary files only give one the helpful information that &quot;the files differ.&quot; 

I&#039;m still looking for a way to set the default but I&#039;m thankful that at least I can now save the file to ASCII without cutting and pasting into notepad.  The tip is much appreciated.</description>
		<content:encoded><![CDATA[<p>This is also a problem with Microsoft&#8217;s legacy systems.  We&#8217;re still using -ugh- visual source safe (VSS).  VSS saves unicode files as binary.  One only realizes there is a problem after running a VSS comparison of the two files.  VSS comparisons of binary files only give one the helpful information that &#8220;the files differ.&#8221; </p>
<p>I&#8217;m still looking for a way to set the default but I&#8217;m thankful that at least I can now save the file to ASCII without cutting and pasting into notepad.  The tip is much appreciated.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

