<?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: Handling UTF-8 in JavaScript, PHP, and Non-UTF8 Databases</title>
	<atom:link href="http://www.dangrossman.info/2007/05/25/handling-utf-8-in-javascript-php-and-non-utf8-databases/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dangrossman.info/2007/05/25/handling-utf-8-in-javascript-php-and-non-utf8-databases/</link>
	<description></description>
	<lastBuildDate>Mon, 08 Mar 2010 15:03:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Johnny</title>
		<link>http://www.dangrossman.info/2007/05/25/handling-utf-8-in-javascript-php-and-non-utf8-databases/comment-page-1/#comment-107579</link>
		<dc:creator>Johnny</dc:creator>
		<pubDate>Thu, 18 Feb 2010 11:48:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.dangrossman.info/2007/05/25/handling-utf-8-in-javascript-php-and-non-utf8-databases/#comment-107579</guid>
		<description>Complete and better solution:

function encode_utf8(s)
	{
		if (window.encodeURIComponent)//check fn present in old browser
		{
			return unescape(encodeURIComponent(s));
		}
		else
		{
			return escape(s);
		}
	}

	function decode_utf8(s)
	{
		if (window.decodeURIComponent)//check fn present in old browser
		{
			return decodeURIComponent(escape(s));
		}
		else
		{
			return unescape(s);
		}
	}</description>
		<content:encoded><![CDATA[<p>Complete and better solution:</p>
<p>function encode_utf8(s)<br />
	{<br />
		if (window.encodeURIComponent)//check fn present in old browser<br />
		{<br />
			return unescape(encodeURIComponent(s));<br />
		}<br />
		else<br />
		{<br />
			return escape(s);<br />
		}<br />
	}</p>
<p>	function decode_utf8(s)<br />
	{<br />
		if (window.decodeURIComponent)//check fn present in old browser<br />
		{<br />
			return decodeURIComponent(escape(s));<br />
		}<br />
		else<br />
		{<br />
			return unescape(s);<br />
		}<br />
	}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yardboy</title>
		<link>http://www.dangrossman.info/2007/05/25/handling-utf-8-in-javascript-php-and-non-utf8-databases/comment-page-1/#comment-106552</link>
		<dc:creator>Yardboy</dc:creator>
		<pubDate>Thu, 21 Jan 2010 23:54:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.dangrossman.info/2007/05/25/handling-utf-8-in-javascript-php-and-non-utf8-databases/#comment-106552</guid>
		<description>So very helpful - gracias!</description>
		<content:encoded><![CDATA[<p>So very helpful &#8211; gracias!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kashif</title>
		<link>http://www.dangrossman.info/2007/05/25/handling-utf-8-in-javascript-php-and-non-utf8-databases/comment-page-1/#comment-60689</link>
		<dc:creator>Kashif</dc:creator>
		<pubDate>Thu, 10 Jul 2008 05:08:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.dangrossman.info/2007/05/25/handling-utf-8-in-javascript-php-and-non-utf8-databases/#comment-60689</guid>
		<description>Really good post indeed, It helped me find and solve UTF-8 problem with my current project. Thanks Dan</description>
		<content:encoded><![CDATA[<p>Really good post indeed, It helped me find and solve UTF-8 problem with my current project. Thanks Dan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://www.dangrossman.info/2007/05/25/handling-utf-8-in-javascript-php-and-non-utf8-databases/comment-page-1/#comment-60191</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Tue, 24 Jun 2008 10:01:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.dangrossman.info/2007/05/25/handling-utf-8-in-javascript-php-and-non-utf8-databases/#comment-60191</guid>
		<description>Hi, If you use the encodeURIComponent in javascript to store a text in the database, what do you use to return teh same decoded text in a java program. I have use decodeURI but does not seem to work. What it returns is in ANSI format. I do know how to change from ANSI to UTF8 but no everything seems to be supported and sometimes part of the string are lost.</description>
		<content:encoded><![CDATA[<p>Hi, If you use the encodeURIComponent in javascript to store a text in the database, what do you use to return teh same decoded text in a java program. I have use decodeURI but does not seem to work. What it returns is in ANSI format. I do know how to change from ANSI to UTF8 but no everything seems to be supported and sometimes part of the string are lost.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: utf8 to ascii</title>
		<link>http://www.dangrossman.info/2007/05/25/handling-utf-8-in-javascript-php-and-non-utf8-databases/comment-page-1/#comment-58858</link>
		<dc:creator>utf8 to ascii</dc:creator>
		<pubDate>Wed, 04 Jun 2008 03:22:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.dangrossman.info/2007/05/25/handling-utf-8-in-javascript-php-and-non-utf8-databases/#comment-58858</guid>
		<description>[...] on the web is tough. If you&#039;re not careful, the text you start with isn&#039;t what you&#039;ll end up with.http://www.dangrossman.info/2007/05/25/handling-utf-8-in-javascript-php-and-non-utf8-databases/Nabble - IETF - IMA - asciiUTF-8 and asciiPunycodeasciiUTF-8 and asciiPunycode. Is ASCIIUTF-8 equal [...]</description>
		<content:encoded><![CDATA[<p>[...] on the web is tough. If you&#8217;re not careful, the text you start with isn&#8217;t what you&#8217;ll end up with.http://www.dangrossman.info/2007/05/25/handling-utf-8-in-javascript-php-and-non-utf8-databases/Nabble &#8211; IETF &#8211; IMA &#8211; asciiUTF-8 and asciiPunycodeasciiUTF-8 and asciiPunycode. Is ASCIIUTF-8 equal [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chasing Amy &#187; J.F. vs. UTF-8</title>
		<link>http://www.dangrossman.info/2007/05/25/handling-utf-8-in-javascript-php-and-non-utf8-databases/comment-page-1/#comment-55878</link>
		<dc:creator>Chasing Amy &#187; J.F. vs. UTF-8</dc:creator>
		<pubDate>Wed, 21 May 2008 10:26:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.dangrossman.info/2007/05/25/handling-utf-8-in-javascript-php-and-non-utf8-databases/#comment-55878</guid>
		<description>[...] Handling UTF-8 in JavaScript, PHP, and Non-UTF8 Databases          &#171; Vivir&#8230; Chasing UTF-8 &#187; [...]</description>
		<content:encoded><![CDATA[<p>[...] Handling UTF-8 in JavaScript, PHP, and Non-UTF8 Databases          &laquo; Vivir&#8230; Chasing UTF-8 &raquo; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mone</title>
		<link>http://www.dangrossman.info/2007/05/25/handling-utf-8-in-javascript-php-and-non-utf8-databases/comment-page-1/#comment-55577</link>
		<dc:creator>Mone</dc:creator>
		<pubDate>Mon, 19 May 2008 10:30:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.dangrossman.info/2007/05/25/handling-utf-8-in-javascript-php-and-non-utf8-databases/#comment-55577</guid>
		<description>great post.
Just a little note, the first line of the javascript code must be
&lt;code&gt;if (window.encodeURIComponent) {&lt;/code&gt;
otherwise browsers without the encodeURIComponent method will throw an exception instead of execute the escape method.</description>
		<content:encoded><![CDATA[<p>great post.<br />
Just a little note, the first line of the javascript code must be<br />
<code>if (window.encodeURIComponent) {</code><br />
otherwise browsers without the encodeURIComponent method will throw an exception instead of execute the escape method.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chasing Amy &#187; Blog Archive &#187; J.F. vs. UTF-8</title>
		<link>http://www.dangrossman.info/2007/05/25/handling-utf-8-in-javascript-php-and-non-utf8-databases/comment-page-1/#comment-54774</link>
		<dc:creator>Chasing Amy &#187; Blog Archive &#187; J.F. vs. UTF-8</dc:creator>
		<pubDate>Wed, 16 Apr 2008 20:15:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.dangrossman.info/2007/05/25/handling-utf-8-in-javascript-php-and-non-utf8-databases/#comment-54774</guid>
		<description>[...] Handling UTF-8 in JavaScript, PHP, and Non-UTF8 Databases      Escrito el Miércoles, Abril 16th, 2008 (8:09 pm). Clasificado bajo: Mis Bits, Think Geek.     Puedes escribir comentarios o trackbacks desde tu blog. Y puedes seguir los comentarios mediante RSS 2.0. [...]</description>
		<content:encoded><![CDATA[<p>[...] Handling UTF-8 in JavaScript, PHP, and Non-UTF8 Databases      Escrito el Miércoles, Abril 16th, 2008 (8:09 pm). Clasificado bajo: Mis Bits, Think Geek.     Puedes escribir comentarios o trackbacks desde tu blog. Y puedes seguir los comentarios mediante RSS 2.0. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maarten</title>
		<link>http://www.dangrossman.info/2007/05/25/handling-utf-8-in-javascript-php-and-non-utf8-databases/comment-page-1/#comment-54013</link>
		<dc:creator>Maarten</dc:creator>
		<pubDate>Tue, 25 Mar 2008 08:49:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.dangrossman.info/2007/05/25/handling-utf-8-in-javascript-php-and-non-utf8-databases/#comment-54013</guid>
		<description>Note that the html_entity_decode($string, ENT_NOQUOTES, ‘UTF-8′); trick doesn&#039;t work in php4 (somehow they fixed it in 5, and refuse to backport it seems), but this function might be a good workaround mb_decode_numericentity()</description>
		<content:encoded><![CDATA[<p>Note that the html_entity_decode($string, ENT_NOQUOTES, ‘UTF-8′); trick doesn&#8217;t work in php4 (somehow they fixed it in 5, and refuse to backport it seems), but this function might be a good workaround mb_decode_numericentity()</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pascal</title>
		<link>http://www.dangrossman.info/2007/05/25/handling-utf-8-in-javascript-php-and-non-utf8-databases/comment-page-1/#comment-53396</link>
		<dc:creator>pascal</dc:creator>
		<pubDate>Wed, 12 Mar 2008 11:11:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.dangrossman.info/2007/05/25/handling-utf-8-in-javascript-php-and-non-utf8-databases/#comment-53396</guid>
		<description>Extremely useful and clear post, that summarizes utf8 in a great way!!

I just had to add 
header(&#039;Content-Type: text/html; charset=utf-8&#039;);

cos I dont want to edit the apache settings to add the correct charset</description>
		<content:encoded><![CDATA[<p>Extremely useful and clear post, that summarizes utf8 in a great way!!</p>
<p>I just had to add<br />
header(&#8216;Content-Type: text/html; charset=utf-8&#8242;);</p>
<p>cos I dont want to edit the apache settings to add the correct charset</p>
]]></content:encoded>
	</item>
</channel>
</rss>
