<?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 Server and conversion of local character</title>
	<atom:link href="http://www.mihavalencic.com/2009/11/20/sql-server-and-conversion-of-local-character/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mihavalencic.com/2009/11/20/sql-server-and-conversion-of-local-character/</link>
	<description>Solving IT Challenges</description>
	<lastBuildDate>Sat, 17 Apr 2010 07:30:09 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: miha</title>
		<link>http://www.mihavalencic.com/2009/11/20/sql-server-and-conversion-of-local-character/comment-page-1/#comment-52</link>
		<dc:creator>miha</dc:creator>
		<pubDate>Sun, 22 Nov 2009 16:06:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.mihavalencic.com/?p=250#comment-52</guid>
		<description>[Unfortunately] true with regards to perf... That would not be the case, however, if they would&#039;ve used UTF-8 instead of UTF-16...
Anyhow, the main &quot;issue&quot; still stands. Identically configured databases (with regards to collation), but different behavior.</description>
		<content:encoded><![CDATA[<p>[Unfortunately] true with regards to perf&#8230; That would not be the case, however, if they would&#8217;ve used UTF-8 instead of UTF-16&#8230;<br />
Anyhow, the main &#8220;issue&#8221; still stands. Identically configured databases (with regards to collation), but different behavior.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mladen</title>
		<link>http://www.mihavalencic.com/2009/11/20/sql-server-and-conversion-of-local-character/comment-page-1/#comment-53</link>
		<dc:creator>Mladen</dc:creator>
		<pubDate>Sun, 22 Nov 2009 14:46:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.mihavalencic.com/?p=250#comment-53</guid>
		<description>try this:
CREATE TABLE t1
(
	name varchar(10) collate
	--Slovenian_CI_AI
	SQL_Latin1_General_CP1_CS_AS
)
go
insert into t1 select &#039;čćžšđ&#039; union all select upper(&#039;čćžšđ&#039;)
SELECT  * FROM    t1
go
drop table t1

you&#039;ll see that the Č is getting downgraded to C when using SQL_Latin1_General_CP1_CS_AS and not when using Slovenian_CI_AI even though the column is varchar.

as for Nvarchar default this may lead to serious perf degradation on very large db&#039;s because you get twice less data read as you could with varchar.</description>
		<content:encoded><![CDATA[<p>try this:<br />
CREATE TABLE t1<br />
(<br />
	name varchar(10) collate<br />
	&#8211;Slovenian_CI_AI<br />
	SQL_Latin1_General_CP1_CS_AS<br />
)<br />
go<br />
insert into t1 select &#8216;čćžšđ&#8217; union all select upper(&#8217;čćžšđ&#8217;)<br />
SELECT  * FROM    t1<br />
go<br />
drop table t1</p>
<p>you&#8217;ll see that the Č is getting downgraded to C when using SQL_Latin1_General_CP1_CS_AS and not when using Slovenian_CI_AI even though the column is varchar.</p>
<p>as for Nvarchar default this may lead to serious perf degradation on very large db&#8217;s because you get twice less data read as you could with varchar.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: miha</title>
		<link>http://www.mihavalencic.com/2009/11/20/sql-server-and-conversion-of-local-character/comment-page-1/#comment-54</link>
		<dc:creator>miha</dc:creator>
		<pubDate>Sat, 21 Nov 2009 11:36:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.mihavalencic.com/?p=250#comment-54</guid>
		<description>Sure. I vote for nvarchar data type to be default. ;)</description>
		<content:encoded><![CDATA[<p>Sure. I vote for nvarchar data type to be default. <img src='http://www.mihavalencic.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Miha Markič</title>
		<link>http://www.mihavalencic.com/2009/11/20/sql-server-and-conversion-of-local-character/comment-page-1/#comment-55</link>
		<dc:creator>Miha Markič</dc:creator>
		<pubDate>Sat, 21 Nov 2009 09:34:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.mihavalencic.com/?p=250#comment-55</guid>
		<description>I&#039;d expect š to work but wouldn&#039;t expect ž. Anyway, I always use nXXX when working with multilingual or just Slovene language.</description>
		<content:encoded><![CDATA[<p>I&#8217;d expect š to work but wouldn&#8217;t expect ž. Anyway, I always use nXXX when working with multilingual or just Slovene language.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: miha</title>
		<link>http://www.mihavalencic.com/2009/11/20/sql-server-and-conversion-of-local-character/comment-page-1/#comment-56</link>
		<dc:creator>miha</dc:creator>
		<pubDate>Sat, 21 Nov 2009 06:23:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.mihavalencic.com/?p=250#comment-56</guid>
		<description>Mladen, I&#039;m puzzled. Your code works. Your code, without the collation on the column, works. The default database collation is Slovenian_CI_AS.

What is very interesting, at least to me, is that the error (for me, at least) happened &lt;b&gt;only&lt;/b&gt; in hosting scenarios, where database collation is the same as the one on my local machine.</description>
		<content:encoded><![CDATA[<p>Mladen, I&#8217;m puzzled. Your code works. Your code, without the collation on the column, works. The default database collation is Slovenian_CI_AS.</p>
<p>What is very interesting, at least to me, is that the error (for me, at least) happened <b>only</b> in hosting scenarios, where database collation is the same as the one on my local machine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mladen</title>
		<link>http://www.mihavalencic.com/2009/11/20/sql-server-and-conversion-of-local-character/comment-page-1/#comment-57</link>
		<dc:creator>Mladen</dc:creator>
		<pubDate>Fri, 20 Nov 2009 21:34:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.mihavalencic.com/?p=250#comment-57</guid>
		<description>btw you can get around that if you set the collation of the column to Slovenian_100_CI_AI
and still have it as varchar.

CREATE TABLE t1 (name varchar(10) collate Slovenian_100_CI_AI)
go
insert into t1 select &#039;čćžšđ&#039; union all select upper(&#039;čćžšđ&#039;)
SELECT * FROM t1
go
drop table t1

the said behaviour happens if you use SQL_* ollations which are not recommended to be used anymore.</description>
		<content:encoded><![CDATA[<p>btw you can get around that if you set the collation of the column to Slovenian_100_CI_AI<br />
and still have it as varchar.</p>
<p>CREATE TABLE t1 (name varchar(10) collate Slovenian_100_CI_AI)<br />
go<br />
insert into t1 select &#8216;čćžšđ&#8217; union all select upper(&#8217;čćžšđ&#8217;)<br />
SELECT * FROM t1<br />
go<br />
drop table t1</p>
<p>the said behaviour happens if you use SQL_* ollations which are not recommended to be used anymore.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
