<?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: UTF8, PHP and MySQL</title>
	<atom:link href="http://akrabat.com/php/utf8-php-and-mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://akrabat.com/php/utf8-php-and-mysql/</link>
	<description>Developing PHP software in the Real World, by Rob Allen</description>
	<lastBuildDate>Tue, 13 Mar 2012 12:47:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: John D</title>
		<link>http://akrabat.com/php/utf8-php-and-mysql/#comment-79030</link>
		<dc:creator>John D</dc:creator>
		<pubDate>Mon, 19 Sep 2011 22:03:45 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/?p=408#comment-79030</guid>
		<description>Nice post, some real gems in here. Is there a PostgreSQL equivalent of PDO::MYSQL_ATTR_INIT_COMMAND =&gt; &quot;SET NAMES utf8&quot;)?</description>
		<content:encoded><![CDATA[<p>Nice post, some real gems in here. Is there a PostgreSQL equivalent of PDO::MYSQL_ATTR_INIT_COMMAND =&gt; "SET NAMES utf8")?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: StevenF</title>
		<link>http://akrabat.com/php/utf8-php-and-mysql/#comment-68820</link>
		<dc:creator>StevenF</dc:creator>
		<pubDate>Thu, 14 Jul 2011 10:11:32 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/?p=408#comment-68820</guid>
		<description>I&#039;ve been looking for this answer for a few weeks now. I tried the php header() like you pointed out and it fixed the problem.

I appreciate this concise blog!</description>
		<content:encoded><![CDATA[<p>I've been looking for this answer for a few weeks now. I tried the php header() like you pointed out and it fixed the problem.</p>
<p>I appreciate this concise blog!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mathieu</title>
		<link>http://akrabat.com/php/utf8-php-and-mysql/#comment-59125</link>
		<dc:creator>Mathieu</dc:creator>
		<pubDate>Sun, 17 Apr 2011 07:23:13 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/?p=408#comment-59125</guid>
		<description>Don&#039;t forget to save your files according to the charset you want to user either ;-)

It&#039;s a common mistake among beginners...

http://web-o-blog.blogspot.com/2011/04/utf-8-with-phpmysql.html</description>
		<content:encoded><![CDATA[<p>Don't forget to save your files according to the charset you want to user either ;-)</p>
<p>It's a common mistake among beginners...</p>
<p><a href="http://web-o-blog.blogspot.com/2011/04/utf-8-with-phpmysql.html" rel="nofollow">http://web-o-blog.blogspot.com/2011/04/utf-8-with-phpmysql.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bassgun</title>
		<link>http://akrabat.com/php/utf8-php-and-mysql/#comment-56802</link>
		<dc:creator>bassgun</dc:creator>
		<pubDate>Wed, 23 Mar 2011 21:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/?p=408#comment-56802</guid>
		<description>Hi Rob,
Today I started a new project and i had to deal with the same issue. My short solution is indeed:

$view-&gt;headMeta()-&gt;appendHttpEquiv(&#039;Content-Type&#039;, &#039;text/html;charset=utf-8&#039;);
(obviously you need to echo $this-&gt;headMeta() in your layout.phtml)

This is the only place in my code where I define utf-8 charset encoding and database saving is totally OK. And it saves me lots of typing and thus headaches ;)

greetz from Holland</description>
		<content:encoded><![CDATA[<p>Hi Rob,<br />
Today I started a new project and i had to deal with the same issue. My short solution is indeed:</p>
<p>$view-&gt;headMeta()-&gt;appendHttpEquiv('Content-Type', 'text/html;charset=utf-8');<br />
(obviously you need to echo $this-&gt;headMeta() in your layout.phtml)</p>
<p>This is the only place in my code where I define utf-8 charset encoding and database saving is totally OK. And it saves me lots of typing and thus headaches ;)</p>
<p>greetz from Holland</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: indrek</title>
		<link>http://akrabat.com/php/utf8-php-and-mysql/#comment-50318</link>
		<dc:creator>indrek</dc:creator>
		<pubDate>Tue, 18 Jan 2011 08:12:18 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/?p=408#comment-50318</guid>
		<description>Hi, 

Thank you so much for this post. I have spent almost all day trying to figure out how to get correct Lithuanian characters from my MySQL database correctly showing on my php website. Finally, I only needed to add this extra line after making the connection to database:

mysql_set_charset(&#039;utf8&#039;);

Thanks again, you saved a lot of my time. ;)</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>Thank you so much for this post. I have spent almost all day trying to figure out how to get correct Lithuanian characters from my MySQL database correctly showing on my php website. Finally, I only needed to add this extra line after making the connection to database:</p>
<p>mysql_set_charset('utf8');</p>
<p>Thanks again, you saved a lot of my time. ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Esteban</title>
		<link>http://akrabat.com/php/utf8-php-and-mysql/#comment-48328</link>
		<dc:creator>Esteban</dc:creator>
		<pubDate>Sun, 19 Dec 2010 22:54:49 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/?p=408#comment-48328</guid>
		<description>Beware when using:
resources.db.params.charset
and
resources.db.params.driver_options.1002

When you have the first, the second is overwritten when calling _connect.  That sucks and it&#039;s most likely an ugly bug, as PDO::MYSQL_ATTR_INIT_COMMAND can be used for more than just setting the charset (which is my case)</description>
		<content:encoded><![CDATA[<p>Beware when using:<br />
resources.db.params.charset<br />
and<br />
resources.db.params.driver_options.1002</p>
<p>When you have the first, the second is overwritten when calling _connect.  That sucks and it's most likely an ugly bug, as PDO::MYSQL_ATTR_INIT_COMMAND can be used for more than just setting the charset (which is my case)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pascal</title>
		<link>http://akrabat.com/php/utf8-php-and-mysql/#comment-42987</link>
		<dc:creator>Pascal</dc:creator>
		<pubDate>Mon, 08 Nov 2010 20:57:55 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/?p=408#comment-42987</guid>
		<description>It works like a charm, Thanks Rob, thanks everybody!</description>
		<content:encoded><![CDATA[<p>It works like a charm, Thanks Rob, thanks everybody!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jean</title>
		<link>http://akrabat.com/php/utf8-php-and-mysql/#comment-40193</link>
		<dc:creator>Jean</dc:creator>
		<pubDate>Tue, 28 Sep 2010 06:55:54 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/?p=408#comment-40193</guid>
		<description>Thanks for this tip.</description>
		<content:encoded><![CDATA[<p>Thanks for this tip.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zac Imboden</title>
		<link>http://akrabat.com/php/utf8-php-and-mysql/#comment-36993</link>
		<dc:creator>Zac Imboden</dc:creator>
		<pubDate>Wed, 28 Jul 2010 21:08:45 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/?p=408#comment-36993</guid>
		<description>Your tip about mysql_set_charset(&#039;utf8&#039;) just transformed my workflow. None of all three of my otherwise excellent O&#039;Reilly manuals for PHP (PHP and MySQL, PHP Cookbook, or Programming PHP) even mention this function.
I thought I was doing everything correctly but the one missing piece was that PEAR was not set up to handle UTF-8 encoding.
So simple!</description>
		<content:encoded><![CDATA[<p>Your tip about mysql_set_charset('utf8') just transformed my workflow. None of all three of my otherwise excellent O'Reilly manuals for PHP (PHP and MySQL, PHP Cookbook, or Programming PHP) even mention this function.<br />
I thought I was doing everything correctly but the one missing piece was that PEAR was not set up to handle UTF-8 encoding.<br />
So simple!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dan</title>
		<link>http://akrabat.com/php/utf8-php-and-mysql/#comment-35809</link>
		<dc:creator>dan</dc:creator>
		<pubDate>Fri, 25 Jun 2010 03:11:33 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/?p=408#comment-35809</guid>
		<description>thanks I was having problems with Ã‘s</description>
		<content:encoded><![CDATA[<p>thanks I was having problems with Ã's</p>
]]></content:encoded>
	</item>
</channel>
</rss>

