<?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>Capi's Corner &#187; admin</title>
	<atom:link href="http://www.dont-panic.cc/capi/tag/admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dont-panic.cc/capi</link>
	<description>Development, Network, Security, Ideas &#038; Opinions</description>
	<lastBuildDate>Fri, 19 Feb 2010 00:11:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Bugzilla: Upgrading MySQL Database from Latin1 to UTF8</title>
		<link>http://www.dont-panic.cc/capi/2006/06/20/bugzilla-upgrading-mysql-database-from-latin1-to-utf8/</link>
		<comments>http://www.dont-panic.cc/capi/2006/06/20/bugzilla-upgrading-mysql-database-from-latin1-to-utf8/#comments</comments>
		<pubDate>Tue, 20 Jun 2006 18:56:36 +0000</pubDate>
		<dc:creator>Martin Carpella</dc:creator>
				<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[bugzilla]]></category>
		<category><![CDATA[charset]]></category>
		<category><![CDATA[internationalization]]></category>
		<category><![CDATA[latin1]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[utf8]]></category>

		<guid isPermaLink="false">http://www.dont-panic.cc/capi/archives/43</guid>
		<description><![CDATA[IMPORTANT Update 2009-07-09: This information is already several years old! You should not use this information for modern versions of Bugzilla (3.2 and above), which will allow you to convert to UTF-8 using checksetup.pl. In the present case, we have a Bugzilla database created with a charset of latin1. Unfortunately, now after updating MySQL to [...]]]></description>
			<content:encoded><![CDATA[<div style="border-style: dashed; border-width: 1px; margin-bottom: 14px;padding: 4px; background: #f0f0f0;"><strong>IMPORTANT Update 2009-07-09:</strong> This information is already several years old! You should not use this information for modern versions of Bugzilla (3.2 and above), which will allow you to convert to UTF-8 using checksetup.pl.</div>
<p>In the present case, we have a <a href="http://www.bugzilla.org/">Bugzilla</a> database created with a charset of latin1. Unfortunately, now after updating MySQL to 4.1, error occured when trying to assign a new developer to a bug, indicating mismatch of collations (UTF-8 vs. Latin1). This is caused by the fact that there is now latin1-data stored in an UTF-8 table.</p>
<p>The following procedure can be used to upgrade the database to UTF-8, eliminating the problem:</p>
<ol style="margin: 2em; text-align: left">
<li><code>mysqldump -p --default_character-set=latin1 --skip-set-charset bugs &gt; dump.sql</code></li>
<li><code>mysql -p --execute="DROP DATABASE bugs; CREATE DATABASE bugs CHARACTER SET utf8 COLLATE utf8_general_ci;"</code></li>
<li><code>mysql -p --default-character-set=utf8 bugs &lt; dump.sql</code></li>
<li><code>perl -pe 's/latin1_bin/utf8_general_ci/g; s/latin1/utf8/g' dump.sql &gt; dump-utf8.sql</code></li>
<li><code>mysql -p --default-character-set=utf8 bugs &lt; dump-utf8.sql</code></li>
</ol>
<p>You should of course always check if the Pearl-RegEx only replaced charset declarations and not some matches within the data.</p>
<p>Thanks to <a href="http://textsnippets.com/posts/show/84">TextSnippets</a> for the script.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dont-panic.cc/capi/2006/06/20/bugzilla-upgrading-mysql-database-from-latin1-to-utf8/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
