<?xml version="1.0" ?>
<rss version="2.0">
	<channel>
		<title>Keith's Weblog: Comments on &quot;My site is now fully unicode-ized and xhtml-ized&quot;</title>
		<description>Keith's Weblog: Comments on &quot;My site is now fully unicode-ized and xhtml-ized&quot;, posted on May 15, 2004</description>
		<link>http://keithdevens.com/weblog/archive/2004/May/15/i18n.xhtml</link>

		<category>Programming</category>
		<category>This website</category>
		<category>Unicode</category>
		<language>en-us</language>
		<image>
			<link>http://keithdevens.com/weblog</link>
			<title>Keith Devens .com</title>
			<url>http://keithdevens.com/images/kbd.gif</url>
		</image>

		<item>
			<title>by andrin</title>
			<link>http://keithdevens.com/weblog/archive/2004/May/15/i18n.xhtml#comment4649</link>
			<guid isPermaLink="false">http://keithdevens.com/weblog/4903#comment4649</guid>
			<pubDate>Sat, 22 May 2004 18:38:29 +0000</pubDate>
			<description>&lt;p class=&quot;st-markup&quot;&gt;Hello Keith!&lt;/p&gt;

&lt;p class=&quot;st-markup&quot;&gt;This was very interesting reading and I have given this a serious thought and I will now do the same on my site. I only wonder if there are any specific reason to explode the HTTP_ACCEPT string and the check for values with in_array istead of using strpos? My HTTP_ACCEPT looks like this: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,[wrapped -- &lt;em&gt;ed&lt;/em&gt;]&lt;br /&gt;
text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,&lt;em&gt;/&lt;/em&gt;;q=0.1&lt;br /&gt;
and as you se there is semi colons as well so exploding this and picking the first four would give me:&lt;br /&gt;
[0] =&amp;gt; text/xml&lt;br /&gt;
[1] =&amp;gt; application/xml&lt;br /&gt;
[2] =&amp;gt; application/xhtml+xml&lt;br /&gt;
[3] =&amp;gt; text/html;q=0.9&lt;br /&gt;
Imagine if it the UA had switched place on text/html and application/xhtml+xml then the first four would yield:&lt;br /&gt;
[0] =&amp;gt; text/xml&lt;br /&gt;
[1] =&amp;gt; application/xml&lt;br /&gt;
[2] =&amp;gt; text/html&lt;br /&gt;
[3] =&amp;gt; application/xhtml+xml;q=0.9&lt;br /&gt;
Wouldn´t in_array fail to find the application/xhtml+xml here? It would of course fall back on the bullet proof text/html but I would only like to get your heads up on this issue, if it´s now is an issue ;-)&lt;br /&gt;
As I asked earlier: If there is any good reason to explode it and do the search in the array, please let me know because I think it´s a brilliant solution.&lt;br /&gt;
By the way. I just finished reading some WDs from the W3Cs site and they have a really good document if you haven´t read it yet give it (&lt;a href=&quot;http://www.w3.org/TR/i18n-html-tech-lang/&quot;&gt;http://www.w3.org/TR/i18n-html-tech-lang/&lt;/a&gt;) a glance.&lt;/p&gt;

&lt;p class=&quot;st-markup&quot;&gt;Cheers&lt;/p&gt;

</description>
		</item>
		<item>
			<title>by Keith</title>
			<link>http://keithdevens.com/weblog/archive/2004/May/15/i18n.xhtml#comment4653</link>
			<guid isPermaLink="false">http://keithdevens.com/weblog/4903#comment4653</guid>
			<pubDate>Sun, 23 May 2004 09:49:45 +0000</pubDate>
			<description>&lt;p class=&quot;st-markup&quot;&gt;Andrin, that's a good point. I was aware of the issue but chose to ignore it because I don't believe it will come up often in practice (since if anything, text/html will be the content-type listed with reduced quality, not application/xhtml+xml), and because I default to text/html anyway which will work fine as a fallback.&lt;/p&gt;

&lt;p class=&quot;st-markup&quot;&gt;The main reason I did it the way I did was just personal preference. I may choose to improve the parser to take care of the issue you highlighted.&lt;/p&gt;

&lt;p class=&quot;st-markup&quot;&gt;By the way, that i18n document from the W3C you linked to I already linked to on &lt;a href=&quot;/weblog/archive/2004/May/11/content&quot;&gt;the post I referenced&lt;/a&gt; from this post. Thanks though.&lt;/p&gt;

</description>
		</item>
		<item>
			<title>by andrin</title>
			<link>http://keithdevens.com/weblog/archive/2004/May/15/i18n.xhtml#comment4664</link>
			<guid isPermaLink="false">http://keithdevens.com/weblog/4903#comment4664</guid>
			<pubDate>Sun, 23 May 2004 22:51:42 +0000</pubDate>
			<description>&lt;p class=&quot;st-markup&quot;&gt;Yeah I saw that you linked to the document I mentioned later when I was scavenging the rest of your site &lt;img class=&quot;smiley&quot; src=&quot;/images/smiley_wink_animated.gif&quot; alt=&quot;Smiley winking&quot; /&gt; There sure is a lot to read. Keept me up all night &lt;img class=&quot;smiley&quot; src=&quot;/images/smiley_side.gif&quot; alt=&quot;Smiley&quot; /&gt;&lt;/p&gt;

</description>
		</item>
		<item>
			<title>by Jim</title>
			<link>http://keithdevens.com/weblog/archive/2004/May/15/i18n.xhtml#comment5046</link>
			<guid isPermaLink="false">http://keithdevens.com/weblog/4903#comment5046</guid>
			<pubDate>Tue, 20 Jul 2004 18:55:41 +0000</pubDate>
			<description>&lt;p class=&quot;st-markup&quot;&gt;You can pass &amp;quot;auto&amp;quot; as the encoding to mb_convert_encoding(), which means you didn't have to use the UTF-8 detector.&lt;/p&gt;

</description>
		</item>
		<item>
			<title>by Keith</title>
			<link>http://keithdevens.com/weblog/archive/2004/May/15/i18n.xhtml#comment5048</link>
			<guid isPermaLink="false">http://keithdevens.com/weblog/4903#comment5048</guid>
			<pubDate>Tue, 20 Jul 2004 22:22:08 +0000</pubDate>
			<description>&lt;p class=&quot;st-markup&quot;&gt;I think I remember trying that and it not doing what I wanted. Thanks for the note though. If I ever need to do something like this again I'll make sure to try it.&lt;/p&gt;

</description>
		</item>
	</channel>
</rss>
