<?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>westworld: a webmasters best friend &#187; utf8</title>
	<atom:link href="http://www.westworld.be/tag/utf8/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.westworld.be</link>
	<description>A webmasters best friend</description>
	<lastBuildDate>Tue, 17 Aug 2010 10:37:26 +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>PHP, MySQL and utf-8</title>
		<link>http://www.westworld.be/mysql/php-mysql-and-utf-8/</link>
		<comments>http://www.westworld.be/mysql/php-mysql-and-utf-8/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 13:27:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[utf8]]></category>

		<guid isPermaLink="false">http://www.westworld.be/?p=17</guid>
		<description><![CDATA[Some tips on how to make sure that php, mysql and utf-8 get along.


No related posts.]]></description>
			<content:encoded><![CDATA[<p>When creating forms with french content, I got strange characters in my database.<br />
The solution was to put some utf-8 declaration at the top of the php pages and to add some extra code for mysql.</p>
<p><strong>php:</strong></p>
<p>&lt;?<br />
php header(&#8216;content-type: text/html; charset: utf-8&#8242;);<br />
mb_internal_encoding( &#8216;UTF-8&#8242; );<br />
?&gt;</p>
<p><strong>MySQL:</strong><br />
add the following code after you make a connection and before you run a query<br />
mysql_query(&#8220;SET NAMES &#8216;utf8&#8242;&#8221;);<br />
mysql_query(&#8220;SET CHARACTER SET utf8&#8243;);</p>
<p>Additionally you could also add accept-charset=&#8221;utf-8&#8243; to your form tags.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.westworld.be/mysql/php-mysql-and-utf-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
