<?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>Convert MySQL database from one encoding/collation into another</title>
	<atom:link href="http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/feed" rel="self" type="application/rss+xml" />
	<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html</link>
	<description>Tiny bits of bioinformatics, [web-]programming etc</description>
	<lastBuildDate>Tue, 09 Mar 2010 15:46:15 +0200</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-2#comment-104224</link>
		<dc:creator>viroshunt</dc:creator>
		<pubDate>Tue, 16 Feb 2010 20:25:42 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-104224</guid>
		<description>take a look at this it may be helpful , it works for me

&lt;a href=&quot;http://blog.vision4web.net/2008/11/change-collation-on-all-tables-and-columns-in-mysql/&quot; rel=&quot;nofollow&quot;&gt;change-collation-on-all-tables-and-columns-in-mysql&lt;/a&gt;

Thanks , good work :)</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->take a look at this it may be helpful , it works for me</p>
<p><a href="http://blog.vision4web.net/2008/11/change-collation-on-all-tables-and-columns-in-mysql/" rel="nofollow">change-collation-on-all-tables-and-columns-in-mysql</a></p>
<p>Thanks , good work <img src='http://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-1#comment-102399</link>
		<dc:creator>banu</dc:creator>
		<pubDate>Sun, 27 Sep 2009 13:03:45 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-102399</guid>
		<description>hi, thx for the script, when i tried, everything work except this error in sql.

SQL query: 

ALTER TABLE `node_revisions` CHANGE `body` `body` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ;



MySQL said:  

#1283 - Column &#039;body&#039; cannot be part of FULLTEXT index</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->hi, thx for the script, when i tried, everything work except this error in sql.</p>
<p>SQL query: </p>
<p>ALTER TABLE `node_revisions` CHANGE `body` `body` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ;</p>
<p>MySQL said:  </p>
<p>#1283 &#8211; Column &#8216;body&#8217; cannot be part of FULLTEXT index<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-1#comment-102242</link>
		<dc:creator>Bogdan</dc:creator>
		<pubDate>Wed, 09 Sep 2009 08:22:00 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-102242</guid>
		<description>Joaquin,

thank you for contributing, I&#039;ve updated the script.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Joaquin,</p>
<p>thank you for contributing, I&#8217;ve updated the script.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-1#comment-102240</link>
		<dc:creator>Joaquin</dc:creator>
		<pubDate>Tue, 08 Sep 2009 20:31:15 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-102240</guid>
		<description>Hi,

There&#039;s still an error with some fields that say: &quot;NOT NULL DEFAULT NULL&quot;

Here&#039;s a fix:

// Does the field default to null, a string, or nothing?
if ( $row[&#039;Default&#039;] === NULL )
	&lt;b&gt;$default = $row[&#039;Null&#039;] == &#039;YES&#039; ? &quot; DEFAULT NULL &quot; : &quot;&quot;;&lt;/b&gt;
elseif ( $row[&#039;Default&#039;] != &#039;&#039; )
	$default = &quot; DEFAULT &#039;&quot;.mysql_real_escape_string($row[&#039;Default&#039;]).&quot;&#039;&quot;;
else
	$default = &#039;&#039;;</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Hi,</p>
<p>There&#8217;s still an error with some fields that say: &#8220;NOT NULL DEFAULT NULL&#8221;</p>
<p>Here&#8217;s a fix:</p>
<p>// Does the field default to null, a string, or nothing?<br />
if ( $row['Default'] === NULL )<br />
	<b>$default = $row['Null'] == &#8216;YES&#8217; ? &#8221; DEFAULT NULL &#8221; : &#8220;&#8221;;</b><br />
elseif ( $row['Default'] != &#8221; )<br />
	$default = &#8221; DEFAULT &#8216;&#8221;.mysql_real_escape_string($row['Default']).&#8221;&#8216;&#8221;;<br />
else<br />
	$default = &#8221;;<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-1#comment-102181</link>
		<dc:creator>Dax</dc:creator>
		<pubDate>Mon, 31 Aug 2009 06:08:05 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-102181</guid>
		<description>hi all,

I have a simple way:

First export DB to file .sql then find &quot;latin1&quot; and replace all as &quot;utf8&quot; with your text editor (i&#039;m use text wrangler).
Second, run this script:

ALTER DATABASE  `your DB name` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci

Import file .sql for the final step.

That &#039;s all, very simple. By this way all old data will by change to UTF-8. Have a nice day.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->hi all,</p>
<p>I have a simple way:</p>
<p>First export DB to file .sql then find &#8220;latin1&#8243; and replace all as &#8220;utf8&#8243; with your text editor (i&#8217;m use text wrangler).<br />
Second, run this script:</p>
<p>ALTER DATABASE  `your DB name` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci</p>
<p>Import file .sql for the final step.</p>
<p>That &#8217;s all, very simple. By this way all old data will by change to UTF-8. Have a nice day.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-1#comment-101811</link>
		<dc:creator>Bogdan</dc:creator>
		<pubDate>Fri, 10 Jul 2009 22:50:31 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-101811</guid>
		<description>JDS,

I&#039;ve added text/plain header, that makes this script cleaner indeed.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->JDS,</p>
<p>I&#8217;ve added text/plain header, that makes this script cleaner indeed.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-1#comment-101807</link>
		<dc:creator>JDS</dc:creator>
		<pubDate>Fri, 10 Jul 2009 18:31:32 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-101807</guid>
		<description>Awesome script, thanks. Especially the very smart &quot;output only&quot; aspect of the script so one can review the lines of SQL.

I have one tiny thing I changed which was a CLI switch. It does not print &quot;&lt; pre &gt;&quot; unless run over HTTP (Line 38):

if ($_SERVER[&#039;HTTP_HOST&#039;]){
    print &#039;&lt; pre &gt;&#039;;
}


An alternative to this is to just output at &quot;Content-type: text/plain&quot;. That will tell the browser to print newlines.

Seeya...</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Awesome script, thanks. Especially the very smart &#8220;output only&#8221; aspect of the script so one can review the lines of SQL.</p>
<p>I have one tiny thing I changed which was a CLI switch. It does not print &#8220;< pre >&#8221; unless run over HTTP (Line 38):</p>
<p>if ($_SERVER['HTTP_HOST']){<br />
    print &#8216;< pre >&#8216;;<br />
}</p>
<p>An alternative to this is to just output at &#8220;Content-type: text/plain&#8221;. That will tell the browser to print newlines.</p>
<p>Seeya&#8230;<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-1#comment-101408</link>
		<dc:creator>Szymon Błąkała</dc:creator>
		<pubDate>Wed, 27 May 2009 12:21:47 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-101408</guid>
		<description>Great script. Thanks a lot.

&lt;code&gt;
// Does the field default to null, a string, or nothing?
		if (  $row[&#039;Null&#039;] == &#039;YES&#039; &amp;&amp; $row[&#039;Default&#039;] === NULL )
			$default = &quot; DEFAULT NULL&quot;;
		elseif ( $row[&#039;Default&#039;] != &#039;&#039; )
			$default = &quot; DEFAULT &#039;&quot;.mysql_real_escape_string($row[&#039;Default&#039;]).&quot;&#039;&quot;;
		else
			$default = &#039;&#039;;
&lt;/code&gt;

will fix null problem</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Great script. Thanks a lot.</p>
<p><code><br />
// Does the field default to null, a string, or nothing?<br />
		if (  $row['Null'] == 'YES' &amp;&amp; $row['Default'] === NULL )<br />
			$default = " DEFAULT NULL";<br />
		elseif ( $row['Default'] != '' )<br />
			$default = " DEFAULT '".mysql_real_escape_string($row['Default'])."'";<br />
		else<br />
			$default = '';<br />
</code></p>
<p>will fix null problem<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-1#comment-101312</link>
		<dc:creator>Max</dc:creator>
		<pubDate>Tue, 19 May 2009 12:47:19 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-101312</guid>
		<description>&lt;blockquote&gt;Looking at the explanation of error #1283:

Error: 1283 SQLSTATE: HY000 (ER_BAD_FT_COLUMN)
Message: Column &#039;%s&#039; cannot be part of FULLTEXT index

it looks like the problem might be with those specific columns, not with the change of collation.&lt;/blockquote&gt;

I guess the source of these problem is that ALL columns in fulltext index should have same collation and error appears when we change collation of one of the columns contained in full text index.
The only solution that I know is to drop index , change collation and recreate index again. But it would be nice if somebody can write the script autоmating this ...</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start --><br />
<blockquote>Looking at the explanation of error #1283:</p>
<p>Error: 1283 SQLSTATE: HY000 (ER_BAD_FT_COLUMN)<br />
Message: Column &#8216;%s&#8217; cannot be part of FULLTEXT index</p>
<p>it looks like the problem might be with those specific columns, not with the change of collation.</p></blockquote>
<p>I guess the source of these problem is that ALL columns in fulltext index should have same collation and error appears when we change collation of one of the columns contained in full text index.<br />
The only solution that I know is to drop index , change collation and recreate index again. But it would be nice if somebody can write the script autоmating this &#8230;<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-1#comment-101274</link>
		<dc:creator>Bogdan</dc:creator>
		<pubDate>Fri, 15 May 2009 16:26:51 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-101274</guid>
		<description>I guess any new tables created inherit the database&#039;s collation settings, unless those new tables have their own specific collation settings specified. So if you are working on a database structure &quot;on the fly/as you work&quot;, you may want to specify the exact collation you want by default as database&#039;s collation, so that any new tables you create have that collation and not the default latin1_swedish.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->I guess any new tables created inherit the database&#8217;s collation settings, unless those new tables have their own specific collation settings specified. So if you are working on a database structure &#8220;on the fly/as you work&#8221;, you may want to specify the exact collation you want by default as database&#8217;s collation, so that any new tables you create have that collation and not the default latin1_swedish.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-1#comment-101266</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Fri, 15 May 2009 01:45:18 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-101266</guid>
		<description>Ohhh well thats excellent then. Thank you for your response =) 

Wouldn&#039;t any new tables being created would still get created with the old collation if the database wasn&#039;t altered wouldnt it?  

I also once read somewhere that you have to create a completely new database for it to work properly but perhaps that was only versions of MySQL below 5.x</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Ohhh well thats excellent then. Thank you for your response =) </p>
<p>Wouldn&#8217;t any new tables being created would still get created with the old collation if the database wasn&#8217;t altered wouldnt it?  </p>
<p>I also once read somewhere that you have to create a completely new database for it to work properly but perhaps that was only versions of MySQL below 5.x<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-1#comment-101265</link>
		<dc:creator>Bogdan</dc:creator>
		<pubDate>Thu, 14 May 2009 20:05:51 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-101265</guid>
		<description>database alteration shouldn&#039;t have any effect in newer versions of MySQL (I think since 5.x), because individual column collation settings override database-level collation specification.

I hope I understood your question correctly.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->database alteration shouldn&#8217;t have any effect in newer versions of MySQL (I think since 5.x), because individual column collation settings override database-level collation specification.</p>
<p>I hope I understood your question correctly.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-1#comment-101250</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Wed, 13 May 2009 09:42:13 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-101250</guid>
		<description>What if you have to alter the database?

ALTER DATABASE `dbname` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci

Should you first create a new DB and copy the tables to it in this new format?</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->What if you have to alter the database?</p>
<p>ALTER DATABASE `dbname` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci</p>
<p>Should you first create a new DB and copy the tables to it in this new format?<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-1#comment-100907</link>
		<dc:creator>Bogdan</dc:creator>
		<pubDate>Thu, 16 Apr 2009 19:14:39 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-100907</guid>
		<description>Looking at the explanation of error #1283:

Error: 1283 SQLSTATE: HY000 (ER_BAD_FT_COLUMN) 
Message: &lt;strong&gt;Column &#039;%s&#039; cannot be part of FULLTEXT index&lt;/strong&gt;

it looks like the problem might be with those specific columns, not with the change of collation.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Looking at the explanation of error #1283:</p>
<p>Error: 1283 SQLSTATE: HY000 (ER_BAD_FT_COLUMN)<br />
Message: <strong>Column &#8216;%s&#8217; cannot be part of FULLTEXT index</strong></p>
<p>it looks like the problem might be with those specific columns, not with the change of collation.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-1#comment-100906</link>
		<dc:creator>jkal</dc:creator>
		<pubDate>Thu, 16 Apr 2009 18:56:05 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-100906</guid>
		<description>Hi Bogdan,
thanks for the script very useful...
however I found on some fields that are indexed I get an #1283 error, I&#039;m not an sql guru so was wondering if you could add a check to see if the field is indexed and ommit it or make another list of such fields, so one can drop the index of those fields convert it then re-add the index. thanks again.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Hi Bogdan,<br />
thanks for the script very useful&#8230;<br />
however I found on some fields that are indexed I get an #1283 error, I&#8217;m not an sql guru so was wondering if you could add a check to see if the field is indexed and ommit it or make another list of such fields, so one can drop the index of those fields convert it then re-add the index. thanks again.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-1#comment-98880</link>
		<dc:creator>Mike Smullin</dc:creator>
		<pubDate>Thu, 12 Feb 2009 00:46:29 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-98880</guid>
		<description>You just saved me SOOO much time! Thank you! :)</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->You just saved me SOOO much time! Thank you! <img src='http://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-1#comment-97589</link>
		<dc:creator>Bogdan</dc:creator>
		<pubDate>Tue, 27 Jan 2009 21:56:01 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-97589</guid>
		<description>Paulo,

1. did you really mean to say that your MySQL client is at version 4.1.22, and Server&#039;s Version is 5.0.67? this is weird, and if it is really the case, then it could be causing you miscellaneous troubles.

2. instead of converting the database, try to set it to utf8_general_ci *before* Joomla installation; if Joomla allows that - ask it to install with utf8 support in DB from the very beginning. If Joomla doesn&#039;t support that - I would suggest that you try Drupal 6.x, it might work perfectly out of the box for you.

3. the errors you list look like you are trying to feed the PHP script to MySQL.... are you accessing the script with your browser, or just feeding it verbatim to the mysql?</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Paulo,</p>
<p>1. did you really mean to say that your MySQL client is at version 4.1.22, and Server&#8217;s Version is 5.0.67? this is weird, and if it is really the case, then it could be causing you miscellaneous troubles.</p>
<p>2. instead of converting the database, try to set it to utf8_general_ci *before* Joomla installation; if Joomla allows that &#8211; ask it to install with utf8 support in DB from the very beginning. If Joomla doesn&#8217;t support that &#8211; I would suggest that you try Drupal 6.x, it might work perfectly out of the box for you.</p>
<p>3. the errors you list look like you are trying to feed the PHP script to MySQL&#8230;. are you accessing the script with your browser, or just feeding it verbatim to the mysql?<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-1#comment-97585</link>
		<dc:creator>paulo</dc:creator>
		<pubDate>Tue, 27 Jan 2009 20:40:05 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-97585</guid>
		<description>Is anyone still following this string? Have searched high and low for a solution and this might be it. Would like to build a simple website with Joomla 1.5.9 adding a few components such as blogs, forums, profile. The problem I am encountering is what you have been discussing here. I&#039;ve loaded everything tested, but my East Asian fonts come out as ?????. I&#039;ve converted the database and table to utf8_general_ci, but can&#039;t get the columns with a manual for each individual column using the ALTER command. That would take days and I think a problem with the binary.... If it makes a difference, MySQL = 4.1.22, Server Version 5.0.67

I&#039;ve tried the scriptd by Bogdan and Russ as well as the link supplied by Bogdan at the top. Since I really know nothing about MySQL I do not understand how to fix the error messages I&#039;m getting:

1. FIRST ERROR at top and down.)

ERROR: Unknown Punctuation String @ 1
STR: &lt;?
SQL: &lt;?php
 
// this script will output the queries need to change all fields/tables to a different collation
// it is HIGHLY suggested you take a MySQL dump prior to running any of the generated
// this code is provided as is and without any warranty
 
set_time_limit(0);&lt;?php
 
2. SECOND ERROR at bottom)

SQL query:

&lt;?php // this script will output the queries need to change all fields/tables to a different collation // it is HIGHLY suggested you take a MySQL dump prior to running any of the generated // this code is provided as is and without any warranty set_time_limit(0);

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#039;&lt;?php

// this script will output the queries need to change all fields/table&#039; at line 1</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Is anyone still following this string? Have searched high and low for a solution and this might be it. Would like to build a simple website with Joomla 1.5.9 adding a few components such as blogs, forums, profile. The problem I am encountering is what you have been discussing here. I&#8217;ve loaded everything tested, but my East Asian fonts come out as ?????. I&#8217;ve converted the database and table to utf8_general_ci, but can&#8217;t get the columns with a manual for each individual column using the ALTER command. That would take days and I think a problem with the binary&#8230;. If it makes a difference, MySQL = 4.1.22, Server Version 5.0.67</p>
<p>I&#8217;ve tried the scriptd by Bogdan and Russ as well as the link supplied by Bogdan at the top. Since I really know nothing about MySQL I do not understand how to fix the error messages I&#8217;m getting:</p>
<p>1. FIRST ERROR at top and down.)</p>
<p>ERROR: Unknown Punctuation String @ 1<br />
STR: &lt;?<br />
SQL: &lt;?php</p>
<p>// this script will output the queries need to change all fields/tables to a different collation<br />
// it is HIGHLY suggested you take a MySQL dump prior to running any of the generated<br />
// this code is provided as is and without any warranty</p>
<p>set_time_limit(0);&lt;?php</p>
<p>2. SECOND ERROR at bottom)</p>
<p>SQL query:</p>
<p>&lt;?php // this script will output the queries need to change all fields/tables to a different collation // it is HIGHLY suggested you take a MySQL dump prior to running any of the generated // this code is provided as is and without any warranty set_time_limit(0);</p>
<p>MySQL said: Documentation<br />
#1064 &#8211; You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#8216;&lt;?php</p>
<p>// this script will output the queries need to change all fields/table&#8217; at line 1<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-1#comment-91425</link>
		<dc:creator>Russ Michaels</dc:creator>
		<pubDate>Sat, 06 Dec 2008 15:56:20 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-91425</guid>
		<description>Here is my version of the script if it is of any use to anyone, I made a couple of mods to get around the NULL issues and the auto_increment issue I mentioned before.

&lt;?php
// original script (v1.0) by/from: http://www.phpwact.org/php/i18n/utf-8/mysql
// improved/modified (v1.02) by Bogdan Tokovenko http://bogdan.org.ua/
// this script will output all queries needed to change all fields/tables to a different collation
// it is HIGHLY suggested you take a MySQL dump prior to running any of the generated queries
// this code is provided AS IS and without any warranty
set_time_limit(0);

// collation you want to change to:
$convert_to   = &#039;utf8_general_ci&#039;;
// character set of new collation:
$character_set= &#039;utf8&#039;;
$show_alter_table = true;
$show_alter_field = true;
// DB login information - modify before use
$username = &#039;username&#039;;
$password = &#039;password&#039;;
$database = &#039;database_name&#039;;
$host	 = &#039;localhost&#039;;
//-- nothing to modify below this line --//
mysql_connect($host, $username, $password);
mysql_select_db($database);
$rs_tables = mysql_query(&quot; SHOW TABLES &quot;) or die(mysql_error());
print &#039;&#039;;
while ($row_tables = mysql_fetch_row($rs_tables)) {
	$table = mysql_real_escape_string($row_tables[0]);
	// Alter table collation
	// ALTER TABLE `account` DEFAULT CHARACTER SET utf8
	if ($show_alter_table)
		echo(&quot;ALTER TABLE `$table` DEFAULT CHARACTER SET $character_set;\r\n&quot;);
	$rs = mysql_query(&quot; SHOW FULL FIELDS FROM `$table` &quot;) or die(mysql_error());
	while ($row=mysql_fetch_assoc($rs)) {
		if ($row[&#039;Collation&#039;] == &#039;&#039; &#124;&#124; $row[&#039;Collation&#039;] == $convert_to)
			continue;
		// Is the field allowed to be null?
		if ( $row[&#039;Null&#039;] == &#039;YES&#039; )
			$nullable = &#039; NULL &#039;;
		else
			$nullable = &#039; NOT NULL&#039;;
		// Does the field default to null, a string, or nothing?
		if ( $row[&#039;Default&#039;] === NULL )
			$default = &quot; DEFAULT NULL&quot;;
		else if ($row[&#039;Default&#039;]!=&#039;&#039;)
			$default = &quot; DEFAULT &#039;&quot;.mysql_real_escape_string($row[&#039;Default&#039;]).&quot;&#039;&quot;;
		else
			$default = &#039;&#039;;
		//don&#039;t alter int columns as they do not have a collation anyway and it buggers up the extra parameters
		if (strpos($row[Type], &#039;int&#039;) !== false)
			$show_alter_field = false;
		else
			$show_alter_field = true;
// Alter field collation:
		// ALTER TABLE `tab` CHANGE `fiel` `fiel` CHAR( 5 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL
		if ($show_alter_field) {
			$field = mysql_real_escape_string($row[&#039;Field&#039;]);
			echo &quot;ALTER TABLE `$table` modify `$field` $row[Type] COLLATE $convert_to ; \r\n&quot;;
		}
	}
}
?&gt;</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Here is my version of the script if it is of any use to anyone, I made a couple of mods to get around the NULL issues and the auto_increment issue I mentioned before.</p>
<p>&lt;?php<br />
// original script (v1.0) by/from: <a href="http://www.phpwact.org/php/i18n/utf-8/mysql" rel="nofollow">http://www.phpwact.org/php/i18n/utf-8/mysql</a><br />
// improved/modified (v1.02) by Bogdan Tokovenko <a href="http://bogdan.org.ua/" rel="nofollow">http://bogdan.org.ua/</a><br />
// this script will output all queries needed to change all fields/tables to a different collation<br />
// it is HIGHLY suggested you take a MySQL dump prior to running any of the generated queries<br />
// this code is provided AS IS and without any warranty<br />
set_time_limit(0);</p>
<p>// collation you want to change to:<br />
$convert_to   = &#8216;utf8_general_ci&#8217;;<br />
// character set of new collation:<br />
$character_set= &#8216;utf8&#8242;;<br />
$show_alter_table = true;<br />
$show_alter_field = true;<br />
// DB login information &#8211; modify before use<br />
$username = &#8216;username&#8217;;<br />
$password = &#8216;password&#8217;;<br />
$database = &#8216;database_name&#8217;;<br />
$host	 = &#8216;localhost&#8217;;<br />
//&#8211; nothing to modify below this line &#8211;//<br />
mysql_connect($host, $username, $password);<br />
mysql_select_db($database);<br />
$rs_tables = mysql_query(&#8221; SHOW TABLES &#8220;) or die(mysql_error());<br />
print &#8221;;<br />
while ($row_tables = mysql_fetch_row($rs_tables)) {<br />
	$table = mysql_real_escape_string($row_tables[0]);<br />
	// Alter table collation<br />
	// ALTER TABLE `account` DEFAULT CHARACTER SET utf8<br />
	if ($show_alter_table)<br />
		echo(&#8220;ALTER TABLE `$table` DEFAULT CHARACTER SET $character_set;\r\n&#8221;);<br />
	$rs = mysql_query(&#8221; SHOW FULL FIELDS FROM `$table` &#8220;) or die(mysql_error());<br />
	while ($row=mysql_fetch_assoc($rs)) {<br />
		if ($row['Collation'] == &#8221; || $row['Collation'] == $convert_to)<br />
			continue;<br />
		// Is the field allowed to be null?<br />
		if ( $row['Null'] == &#8216;YES&#8217; )<br />
			$nullable = &#8216; NULL &#8216;;<br />
		else<br />
			$nullable = &#8216; NOT NULL&#8217;;<br />
		// Does the field default to null, a string, or nothing?<br />
		if ( $row['Default'] === NULL )<br />
			$default = &#8221; DEFAULT NULL&#8221;;<br />
		else if ($row['Default']!=&#8221;)<br />
			$default = &#8221; DEFAULT &#8216;&#8221;.mysql_real_escape_string($row['Default']).&#8221;&#8216;&#8221;;<br />
		else<br />
			$default = &#8221;;<br />
		//don&#8217;t alter int columns as they do not have a collation anyway and it buggers up the extra parameters<br />
		if (strpos($row[Type], &#8216;int&#8217;) !== false)<br />
			$show_alter_field = false;<br />
		else<br />
			$show_alter_field = true;<br />
// Alter field collation:<br />
		// ALTER TABLE `tab` CHANGE `fiel` `fiel` CHAR( 5 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL<br />
		if ($show_alter_field) {<br />
			$field = mysql_real_escape_string($row['Field']);<br />
			echo &#8220;ALTER TABLE `$table` modify `$field` $row[Type] COLLATE $convert_to ; \r\n&#8221;;<br />
		}<br />
	}<br />
}<br />
?&gt;<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-1#comment-91300</link>
		<dc:creator>Bogdan</dc:creator>
		<pubDate>Fri, 05 Dec 2008 23:23:56 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-91300</guid>
		<description>done.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->done.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-1#comment-91235</link>
		<dc:creator>JMD</dc:creator>
		<pubDate>Fri, 05 Dec 2008 11:21:18 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-91235</guid>
		<description>If you send me an email on which i can respond i give you cpanel and ftp on a test/demo site we host. Should help to have all the fun in the world..... ;-)  You have my email......

Chad</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->If you send me an email on which i can respond i give you cpanel and ftp on a test/demo site we host. Should help to have all the fun in the world&#8230;.. <img src='http://bogdan.org.ua/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />   You have my email&#8230;&#8230;</p>
<p>Chad<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-1#comment-91232</link>
		<dc:creator>Bogdan</dc:creator>
		<pubDate>Fri, 05 Dec 2008 11:10:12 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-91232</guid>
		<description>If anyone could post here steps to reproduce the &quot;NOT NULL DEFAULT NULL&quot; problem, I would be able to fix it once and forever :)

(The problem is that I can&#039;t reproduce this error on my databases - thus &quot;steps to reproduce&quot; must include a sample of actual database table.)</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->If anyone could post here steps to reproduce the &#8220;NOT NULL DEFAULT NULL&#8221; problem, I would be able to fix it once and forever <img src='http://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>(The problem is that I can&#8217;t reproduce this error on my databases &#8211; thus &#8220;steps to reproduce&#8221; must include a sample of actual database table.)<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-1#comment-91226</link>
		<dc:creator>Vangelis</dc:creator>
		<pubDate>Fri, 05 Dec 2008 10:20:21 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-91226</guid>
		<description>Thank you very much! This script made my day. I had the same problem with &quot;NOT NULL DEFAULT NULL&quot; but everything worked out fine after changing it to &quot;NOT NULL&quot;. Thanks again!</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Thank you very much! This script made my day. I had the same problem with &#8220;NOT NULL DEFAULT NULL&#8221; but everything worked out fine after changing it to &#8220;NOT NULL&#8221;. Thanks again!<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-1#comment-89727</link>
		<dc:creator>Bogdan</dc:creator>
		<pubDate>Thu, 27 Nov 2008 09:05:31 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-89727</guid>
		<description>Chad,

it is the same old problem which is for some reason happening all the time.

I&#039;ve just tested the script locally - and for me it works perfectly.

I can only recommend that after you  get all the generated queries, just run a global search-and-replace, replacing each and every &quot;NOT NULL DEFAULT NULL&quot; with &quot;NOT NULL&quot;

If you would like the script to do that for you (and also contribute to let others avoid this error), please do the following:
- for the first table where you get the error, run the query
&lt;blockquote&gt;SHOW FULL FIELDS FROM tablename&lt;/blockquote&gt; (where tablename is the name of that troublesome table),
and post the result here. That &lt;em&gt;might&lt;/em&gt; help me identify the reason why it is not working for you but does work for me.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Chad,</p>
<p>it is the same old problem which is for some reason happening all the time.</p>
<p>I&#8217;ve just tested the script locally &#8211; and for me it works perfectly.</p>
<p>I can only recommend that after you  get all the generated queries, just run a global search-and-replace, replacing each and every &#8220;NOT NULL DEFAULT NULL&#8221; with &#8220;NOT NULL&#8221;</p>
<p>If you would like the script to do that for you (and also contribute to let others avoid this error), please do the following:<br />
- for the first table where you get the error, run the query</p>
<blockquote><p>SHOW FULL FIELDS FROM tablename</p></blockquote>
<p> (where tablename is the name of that troublesome table),<br />
and post the result here. That <em>might</em> help me identify the reason why it is not working for you but does work for me.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-1#comment-89673</link>
		<dc:creator>jmd</dc:creator>
		<pubDate>Thu, 27 Nov 2008 05:11:47 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-89673</guid>
		<description>Very nice script and the output is generated but when i run the query (Joomla database mysql 5.x)

i get on every table 

ALTER TABLE `banners` CHANGE `description` `description` varchar( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT NULL ;

MySQL said: Documentation
#1067 - Invalid default value for &#039;description&#039; &quot;

the original installed field values here are 

field: description
type:  text
collation: utf8_unicode_ci
attributes: (empty)
null : No
default: (empty)
extra: (empty) 

This is basically fact on all tables and it runs into this error on same fields and stops. Any ideas would be welcome?

Chad</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Very nice script and the output is generated but when i run the query (Joomla database mysql 5.x)</p>
<p>i get on every table </p>
<p>ALTER TABLE `banners` CHANGE `description` `description` varchar( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT NULL ;</p>
<p>MySQL said: Documentation<br />
#1067 &#8211; Invalid default value for &#8216;description&#8217; &#8221;</p>
<p>the original installed field values here are </p>
<p>field: description<br />
type:  text<br />
collation: utf8_unicode_ci<br />
attributes: (empty)<br />
null : No<br />
default: (empty)<br />
extra: (empty) </p>
<p>This is basically fact on all tables and it runs into this error on same fields and stops. Any ideas would be welcome?</p>
<p>Chad<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-1#comment-88919</link>
		<dc:creator>Bogdan</dc:creator>
		<pubDate>Mon, 24 Nov 2008 10:02:45 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-88919</guid>
		<description>Ns,

I&#039;ve corrected the text - of course, it must be database name.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Ns,</p>
<p>I&#8217;ve corrected the text &#8211; of course, it must be database name.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-1#comment-88901</link>
		<dc:creator>ns</dc:creator>
		<pubDate>Mon, 24 Nov 2008 02:20:26 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-88901</guid>
		<description>pardon the newbie question....

in the line below, do I enter each table individually or simply put the database name in the place of &#039;table&#039;?

$database = &#039;table&#039;;

thanks</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->pardon the newbie question&#8230;.</p>
<p>in the line below, do I enter each table individually or simply put the database name in the place of &#8216;table&#8217;?</p>
<p>$database = &#8216;table&#8217;;</p>
<p>thanks<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-1#comment-83545</link>
		<dc:creator>Martin Westin</dc:creator>
		<pubDate>Fri, 10 Oct 2008 22:39:45 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-83545</guid>
		<description>Sorry. My last post was a bit crippled from being written on my phone in the car.

There are probably many people that can explain the details of why you do it this way. But what I know is that if you can to &quot;convert&quot; existing data from one Character set to another in MySQL, you do it by making the field a binary (and thus tricking MySQL to reinterpret the raw data stored when you bring it back into a text field in another character set).

I have implemented two such conversions for two common situations. But you can play around with this quite a bit if you have some really messed up data.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->Sorry. My last post was a bit crippled from being written on my phone in the car.</p>
<p>There are probably many people that can explain the details of why you do it this way. But what I know is that if you can to &#8220;convert&#8221; existing data from one Character set to another in MySQL, you do it by making the field a binary (and thus tricking MySQL to reinterpret the raw data stored when you bring it back into a text field in another character set).</p>
<p>I have implemented two such conversions for two common situations. But you can play around with this quite a bit if you have some really messed up data.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-1#comment-83541</link>
		<dc:creator>Martin Westin</dc:creator>
		<pubDate>Fri, 10 Oct 2008 21:58:24 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-83541</guid>
		<description>When you change the encoding, any existing data will be missinterpreted whenever the charsets differ. Converting  the field via a binary type will allow you to trick MySQL into reinterpreting the &quot;meaning&quot; of the data.
This will not affect A-Z but other (accented) characters.</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start -->When you change the encoding, any existing data will be missinterpreted whenever the charsets differ. Converting  the field via a binary type will allow you to trick MySQL into reinterpreting the &#8220;meaning&#8221; of the data.<br />
This will not affect A-Z but other (accented) characters.<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
	<item>
		<title>Convert MySQL database from one encoding/collation into another</title>
		<link>http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html/comment-page-1#comment-83519</link>
		<dc:creator>Bogdan</dc:creator>
		<pubDate>Fri, 10 Oct 2008 19:23:36 +0000</pubDate>
		<guid isPermaLink="false">http://bogdan.org.ua/2008/02/08/convert-mysql-database-from-one-encodingcollation-into-another.html#comment-83519</guid>
		<description>&lt;strong&gt;Martin&lt;/strong&gt;,

why would you need these conversions?

char, varchar and text -&gt; blob
mediumtext -&gt; mediumblob
longtext -&gt; longblob

blobs are for binary data, so why put the text into binary fields?</description>
		<content:encoded><![CDATA[<p><!-- google_ad_section_start --><strong>Martin</strong>,</p>
<p>why would you need these conversions?</p>
<p>char, varchar and text -> blob<br />
mediumtext -> mediumblob<br />
longtext -> longblob</p>
<p>blobs are for binary data, so why put the text into binary fields?<!-- google_ad_section_end --></p>
]]></content:encoded>
	</item>
</channel>
</rss>
