<?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: Tales of Bus Fares and Film Certificates</title>
	<atom:link href="http://www.mrfofr.com/2005/07/tales-of-bus-fares-and-film-certificates/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mrfofr.com/2005/07/tales-of-bus-fares-and-film-certificates/</link>
	<description>Mr FofR</description>
	<lastBuildDate>Tue, 24 Jan 2012 12:35:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Michael Tandy</title>
		<link>http://www.mrfofr.com/2005/07/tales-of-bus-fares-and-film-certificates/comment-page-1/#comment-16</link>
		<dc:creator>Michael Tandy</dc:creator>
		<pubDate>Thu, 21 Jul 2005 00:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.mrfofr.com/?p=252#comment-16</guid>
		<description>I can answer the A-Hat thing.&lt;br/&gt;&lt;br/&gt;First, check out &lt;a HREF=&quot;http://www.joelonsoftware.com/articles/Unicode.html&quot; REL=&quot;nofollow&quot;&gt;this page&lt;/a&gt;. Come back and read the rest of this message when you&#039;re done.&lt;br/&gt;&lt;br/&gt;In your web browser, go to View &gt; Character Encoding. It&#039;s auto-detected Western (ISO-8859-1). Change to Unicode (UTF-8). The A-hat disappears.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;What&#039;s happening here:&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;UTF-8 is a backwards-compabible form of Unicode that represents ASCII characters 0 to 127 as 8-bit, i.e. identically to other types of ASCII. It represents other characters as 16-bit.&lt;br/&gt;&lt;br/&gt;Since £ is not within ASCII 0 to 127, it is represented by 16 bits.&lt;br/&gt;&lt;br/&gt;All other characters on the page are represented as 8 bits, because they&#039;re normal ASCII.&lt;br/&gt;&lt;br/&gt;Browsers detect the page as ISO-8859-1, so the UTF-8 (16 bit) character shows up as two characters.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;But I have a meta http-equiv tag!&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;Correct, and if you save the file on your computer, it processes that tag OK.&lt;br/&gt;&lt;br/&gt;But then, http-equiv is meant as an in-page replacement for HTTP headers. If you check out &lt;a HREF=&quot;http://tinyurl.com/8uhne&quot; REL=&quot;nofollow&quot;&gt;the results of this test&lt;/a&gt;, you can see your web server is sending out a content-type header that must be overriding the http-equiv line.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;How to fix it&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;I don&#039;t know if you edited the PHP page to include that header... if you did, what I&#039;m about to say might not apply.&lt;br/&gt;&lt;br/&gt;Check out &lt;a HREF=&quot;http://uk2.php.net/header&quot; REL=&quot;nofollow&quot;&gt;the PHP header command&lt;/a&gt;. Sounds like what you need, right?&lt;br/&gt;&lt;br/&gt;I havn&#039;t tested this, but I suspect you want to put this command somewhere in your PHP file:&lt;br/&gt;&lt;br/&gt;header(&quot;Content-Type: text/html; charset=ISO-8859-1&quot;);&lt;br/&gt;&lt;br/&gt;It&#039;ll have to be between PHP tags, obviously.&lt;br/&gt;&lt;br/&gt;Note: PHP is notorious for it&#039;s shit support for unicode, so that header might be being sent intentionally by the blog software. Changing it might break everything. If it does, change it back.&lt;br/&gt;&lt;br/&gt;Cheers,&lt;br/&gt;&lt;br/&gt;Michael</description>
		<content:encoded><![CDATA[<p>I can answer the A-Hat thing.</p>
<p>First, check out <a HREF="http://www.joelonsoftware.com/articles/Unicode.html" REL="nofollow">this page</a>. Come back and read the rest of this message when you’re done.</p>
<p>In your web browser, go to View &gt; Character Encoding. It’s auto-detected Western (ISO-8859–1). Change to Unicode (UTF-8). The A-hat disappears.</p>
<p><b>What’s happening here:</b></p>
<p>UTF-8 is a backwards-compabible form of Unicode that represents ASCII characters 0 to 127 as 8-bit, i.e. identically to other types of ASCII. It represents other characters as 16-bit.</p>
<p>Since £ is not within ASCII 0 to 127, it is represented by 16 bits.</p>
<p>All other characters on the page are represented as 8 bits, because they’re normal ASCII.</p>
<p>Browsers detect the page as ISO-8859–1, so the UTF-8 (16 bit) character shows up as two characters.</p>
<p><b>But I have a meta http-equiv tag!</b></p>
<p>Correct, and if you save the file on your computer, it processes that tag OK.</p>
<p>But then, http-equiv is meant as an in-page replacement for HTTP headers. If you check out <a HREF="http://tinyurl.com/8uhne" REL="nofollow">the results of this test</a>, you can see your web server is sending out a content-type header that must be overriding the http-equiv line.</p>
<p><b>How to fix it</b></p>
<p>I don’t know if you edited the PHP page to include that header… if you did, what I’m about to say might not apply.</p>
<p>Check out <a HREF="http://uk2.php.net/header" REL="nofollow">the PHP header command</a>. Sounds like what you need, right?</p>
<p>I havn’t tested this, but I suspect you want to put this command somewhere in your PHP file:</p>
<p>header(“Content-Type: text/html; charset=ISO-8859–1″);</p>
<p>It’ll have to be between PHP tags, obviously.</p>
<p>Note: PHP is notorious for it’s shit support for unicode, so that header might be being sent intentionally by the blog software. Changing it might break everything. If it does, change it back.</p>
<p>Cheers,</p>
<p>Michael</p>
]]></content:encoded>
	</item>
</channel>
</rss>

