<?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: Safari, AJAX and &#034;broken&#034; encodings</title>
	<atom:link href="http://macdiggs.com/2006/06/15/safari-ajax-and-broken-encodings/feed/" rel="self" type="application/rss+xml" />
	<link>http://macdiggs.com/2006/06/15/safari-ajax-and-broken-encodings/</link>
	<description>Digging the watery grave and talking about PHP, Rails and tech stuff..</description>
	<pubDate>Mon, 21 May 2012 12:53:14 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: marcus</title>
		<link>http://macdiggs.com/2006/06/15/safari-ajax-and-broken-encodings/comment-page-1/#comment-27265</link>
		<dc:creator>marcus</dc:creator>
		<pubDate>Tue, 15 Jul 2008 19:02:03 +0000</pubDate>
		<guid isPermaLink="false">http://macdiggs.com/index.php/2006/06/15/safari-ajax-and-broken-encodings/#comment-27265</guid>
		<description>I believe their is a solution to this over at www.ajaxatoms.com. Nice read BTW!</description>
		<content:encoded><![CDATA[<p>I believe their is a solution to this over at <a href="http://www.ajaxatoms.com" rel="nofollow">http://www.ajaxatoms.com</a>. Nice read BTW!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joran</title>
		<link>http://macdiggs.com/2006/06/15/safari-ajax-and-broken-encodings/comment-page-1/#comment-26329</link>
		<dc:creator>Joran</dc:creator>
		<pubDate>Thu, 08 Nov 2007 10:20:01 +0000</pubDate>
		<guid isPermaLink="false">http://macdiggs.com/index.php/2006/06/15/safari-ajax-and-broken-encodings/#comment-26329</guid>
		<description>I had the same problem.

I had "AddDefaultCharset UTF-8" in my .htaccess file to automatically add a UTF charset header to all server responses.

Safari was working fine with the data when shown using a straightforward PHP/MySQL page. When I showed it using AJAX, the encoding cracked open in only Safari.

It seems Apache's charset header didn't count when it came to Safari. Setting it manually in the back-end PHP script for my AJAX request solved the problem. Just like you said.

Thank you!</description>
		<content:encoded><![CDATA[<p>I had the same problem.</p>
<p>I had &#034;AddDefaultCharset UTF-8&#034; in my .htaccess file to automatically add a UTF charset header to all server responses.</p>
<p>Safari was working fine with the data when shown using a straightforward PHP/MySQL page. When I showed it using AJAX, the encoding cracked open in only Safari.</p>
<p>It seems Apache&#039;s charset header didn&#039;t count when it came to Safari. Setting it manually in the back-end PHP script for my AJAX request solved the problem. Just like you said.</p>
<p>Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christophe Sautot</title>
		<link>http://macdiggs.com/2006/06/15/safari-ajax-and-broken-encodings/comment-page-1/#comment-25992</link>
		<dc:creator>Christophe Sautot</dc:creator>
		<pubDate>Thu, 19 Jul 2007 11:18:22 +0000</pubDate>
		<guid isPermaLink="false">http://macdiggs.com/index.php/2006/06/15/safari-ajax-and-broken-encodings/#comment-25992</guid>
		<description>After having pretty much the same problem as you, with a Japanese AJAX call, I Google'd "safari ajax utf8" and your post popped up as the first result - fabulous!!  Thanks for your write-up.</description>
		<content:encoded><![CDATA[<p>After having pretty much the same problem as you, with a Japanese AJAX call, I Google&#039;d &#034;safari ajax utf8&#034; and your post popped up as the first result - fabulous!!  Thanks for your write-up.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Veselin Kulov</title>
		<link>http://macdiggs.com/2006/06/15/safari-ajax-and-broken-encodings/comment-page-1/#comment-25815</link>
		<dc:creator>Veselin Kulov</dc:creator>
		<pubDate>Mon, 11 Jun 2007 11:50:47 +0000</pubDate>
		<guid isPermaLink="false">http://macdiggs.com/index.php/2006/06/15/safari-ajax-and-broken-encodings/#comment-25815</guid>
		<description>Finally solved my problem. Turned out that Safari is not switching to UTF-8 on a text/json response. I have charset set to utf-8 inside the html and in all http response headers (both for html and the json). And now my unicode characters are not displayed properly in Safari. What the heck, it even works in IE6 but not in Safari :)

Turned out that I'm missing the charset attribite in the  tag. I'm using ScriptSrcIO as a transport mechanism.</description>
		<content:encoded><![CDATA[<p>Finally solved my problem. Turned out that Safari is not switching to UTF-8 on a text/json response. I have charset set to utf-8 inside the html and in all http response headers (both for html and the json). And now my unicode characters are not displayed properly in Safari. What the heck, it even works in IE6 but not in Safari :)</p>
<p>Turned out that I&#039;m missing the charset attribite in the  tag. I&#039;m using ScriptSrcIO as a transport mechanism.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug Lerner</title>
		<link>http://macdiggs.com/2006/06/15/safari-ajax-and-broken-encodings/comment-page-1/#comment-17536</link>
		<dc:creator>Doug Lerner</dc:creator>
		<pubDate>Mon, 19 Mar 2007 07:32:54 +0000</pubDate>
		<guid isPermaLink="false">http://macdiggs.com/index.php/2006/06/15/safari-ajax-and-broken-encodings/#comment-17536</guid>
		<description>This is driving me crazy too. I'm not using ASP either. I seem to be sending the correct content-type from my server though:

addResponseHttp( "Content-Type:text/html; charset=shift_jis" )'

but the Japanese that comes back from my AJAX/Prototype calls seem garbled.

doug</description>
		<content:encoded><![CDATA[<p>This is driving me crazy too. I&#039;m not using ASP either. I seem to be sending the correct content-type from my server though:</p>
<p>addResponseHttp( &#034;Content-Type:text/html; charset=shift_jis&#034; )&#039;</p>
<p>but the Japanese that comes back from my AJAX/Prototype calls seem garbled.</p>
<p>doug</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eu</title>
		<link>http://macdiggs.com/2006/06/15/safari-ajax-and-broken-encodings/comment-page-1/#comment-15634</link>
		<dc:creator>eu</dc:creator>
		<pubDate>Wed, 07 Mar 2007 07:27:59 +0000</pubDate>
		<guid isPermaLink="false">http://macdiggs.com/index.php/2006/06/15/safari-ajax-and-broken-encodings/#comment-15634</guid>
		<description>i am using asp .. i m not sure whether i using the write way to set the charset onot and it doesn't work in Safari .. not sure where is the mistake .. 

 
</description>
		<content:encoded><![CDATA[<p>i am using asp .. i m not sure whether i using the write way to set the charset onot and it doesn&#039;t work in Safari .. not sure where is the mistake ..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rich Harris</title>
		<link>http://macdiggs.com/2006/06/15/safari-ajax-and-broken-encodings/comment-page-1/#comment-15150</link>
		<dc:creator>Rich Harris</dc:creator>
		<pubDate>Sun, 04 Mar 2007 09:35:26 +0000</pubDate>
		<guid isPermaLink="false">http://macdiggs.com/index.php/2006/06/15/safari-ajax-and-broken-encodings/#comment-15150</guid>
		<description>Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! A million times over!</description>
		<content:encoded><![CDATA[<p>Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! A million times over!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike</title>
		<link>http://macdiggs.com/2006/06/15/safari-ajax-and-broken-encodings/comment-page-1/#comment-3603</link>
		<dc:creator>mike</dc:creator>
		<pubDate>Sat, 18 Nov 2006 01:07:41 +0000</pubDate>
		<guid isPermaLink="false">http://macdiggs.com/index.php/2006/06/15/safari-ajax-and-broken-encodings/#comment-3603</guid>
		<description>you're welcome Rickyok :)</description>
		<content:encoded><![CDATA[<p>you&#039;re welcome Rickyok :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rickyok</title>
		<link>http://macdiggs.com/2006/06/15/safari-ajax-and-broken-encodings/comment-page-1/#comment-3576</link>
		<dc:creator>Rickyok</dc:creator>
		<pubDate>Fri, 17 Nov 2006 18:11:18 +0000</pubDate>
		<guid isPermaLink="false">http://macdiggs.com/index.php/2006/06/15/safari-ajax-and-broken-encodings/#comment-3576</guid>
		<description>Wuaaaaaaa. thank youuu. I lovee youuu mikee!! I fixing the AJAX with shift-jis bug 3 hours. And the only mistake i made was i type shift-JIS in the content-type. Ohhhh nooo T_T it should be shift_JIS

ThAnK Y0U!</description>
		<content:encoded><![CDATA[<p>Wuaaaaaaa. thank youuu. I lovee youuu mikee!! I fixing the AJAX with shift-jis bug 3 hours. And the only mistake i made was i type shift-JIS in the content-type. Ohhhh nooo T_T it should be shift_JIS</p>
<p>ThAnK Y0U!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Girard</title>
		<link>http://macdiggs.com/2006/06/15/safari-ajax-and-broken-encodings/comment-page-1/#comment-1775</link>
		<dc:creator>Paul Girard</dc:creator>
		<pubDate>Fri, 13 Oct 2006 20:44:17 +0000</pubDate>
		<guid isPermaLink="false">http://macdiggs.com/index.php/2006/06/15/safari-ajax-and-broken-encodings/#comment-1775</guid>
		<description>My turn to add an other trick about SAFARI/HTTPREQUEST and charset.

I learned from you that I need to specify the charset by rewriting the header information. This does the trick until I needed to make synchronous requests.

It appears that using httprequest with the third argument as false (i.e. synchronously) makes UTF-8 unreadable by SAFARI... 

I can't understand why ?
This is driving me made... 

Paul</description>
		<content:encoded><![CDATA[<p>My turn to add an other trick about SAFARI/HTTPREQUEST and charset.</p>
<p>I learned from you that I need to specify the charset by rewriting the header information. This does the trick until I needed to make synchronous requests.</p>
<p>It appears that using httprequest with the third argument as false (i.e. synchronously) makes UTF-8 unreadable by SAFARI&#8230; </p>
<p>I can&#039;t understand why ?<br />
This is driving me made&#8230; </p>
<p>Paul</p>
]]></content:encoded>
	</item>
</channel>
</rss>

