<?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"
	>
<channel>
	<title>Comments on: IE6 bug: Encode and ignore</title>
	<atom:link href="http://friendlybit.com/css/ie6-bug-encode-and-ignore/feed/" rel="self" type="application/rss+xml" />
	<link>http://friendlybit.com/css/ie6-bug-encode-and-ignore/</link>
	<description>You have found Friendly Bit, a web development blog. I focus on client side technologies like CSS, HTML and Javascript. You find my articles below and categories to the right.</description>
	<pubDate>Sun, 12 Oct 2008 00:50:24 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Emil Stenström</title>
		<link>http://friendlybit.com/css/ie6-bug-encode-and-ignore/#comment-5720</link>
		<dc:creator>Emil Stenström</dc:creator>
		<pubDate>Sat, 14 Oct 2006 08:39:41 +0000</pubDate>
		<guid isPermaLink="false">http://friendlybit.com/css/ie6-bug-encode-and-ignore/#comment-5720</guid>
		<description>@Niels: Interesting. Then it's not a IE bug, just a difference in handling between IE and Firefox. Interesting to see Firefox handling stuff more code less strict than IE. I'm blessed with skilled readers!</description>
		<content:encoded><![CDATA[<p>@Niels: Interesting. Then it&#8217;s not a IE bug, just a difference in handling between IE and Firefox. Interesting to see Firefox handling stuff more code less strict than IE. I&#8217;m blessed with skilled readers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Niels Leenheer</title>
		<link>http://friendlybit.com/css/ie6-bug-encode-and-ignore/#comment-5669</link>
		<dc:creator>Niels Leenheer</dc:creator>
		<pubDate>Wed, 11 Oct 2006 22:20:20 +0000</pubDate>
		<guid isPermaLink="false">http://friendlybit.com/css/ie6-bug-encode-and-ignore/#comment-5669</guid>
		<description>@emil: In the ISO 8859 character set the character å is represented by the hexadecimal value of E5. 

If the first byte of a character in the UTF-8 charset starts with a hexadecimal value between E0 and EF, then the character consists of three bytes. 

So, both the å, the space and the asterisk would be part of a single character...</description>
		<content:encoded><![CDATA[<p>@emil: In the ISO 8859 character set the character å is represented by the hexadecimal value of E5. </p>
<p>If the first byte of a character in the UTF-8 charset starts with a hexadecimal value between E0 and EF, then the character consists of three bytes. </p>
<p>So, both the å, the space and the asterisk would be part of a single character&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zcorpan</title>
		<link>http://friendlybit.com/css/ie6-bug-encode-and-ignore/#comment-5668</link>
		<dc:creator>zcorpan</dc:creator>
		<pubDate>Wed, 11 Oct 2006 22:18:53 +0000</pubDate>
		<guid isPermaLink="false">http://friendlybit.com/css/ie6-bug-encode-and-ignore/#comment-5668</guid>
		<description>IE6 treats the iso-8859-1 string "å *" as a three-byte character when interpreted as utf-8. Other browsers don't. (I'm not sure which is correct.)

@charset is supported by at least Gecko, Opera and recent WebKit builds, and it seems IE6 supports it too, actually.</description>
		<content:encoded><![CDATA[<p>IE6 treats the iso-8859-1 string &#8220;å *&#8221; as a three-byte character when interpreted as utf-8. Other browsers don&#8217;t. (I&#8217;m not sure which is correct.)</p>
<p>@charset is supported by at least Gecko, Opera and recent WebKit builds, and it seems IE6 supports it too, actually.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Emil Stenström</title>
		<link>http://friendlybit.com/css/ie6-bug-encode-and-ignore/#comment-5665</link>
		<dc:creator>Emil Stenström</dc:creator>
		<pubDate>Wed, 11 Oct 2006 21:38:02 +0000</pubDate>
		<guid isPermaLink="false">http://friendlybit.com/css/ie6-bug-encode-and-ignore/#comment-5665</guid>
		<description>@Niels: I could understand the bug if it was å*/, but as you see in the example there's a space in between the å and the *. That's a bug then isn't it?

I had heard of the @charset rule but didn't think there where any browser support for it. Is there?

This blog is more practical than adhearing to specifications :) Good comment, and thanks for pointing out my errors.</description>
		<content:encoded><![CDATA[<p>@Niels: I could understand the bug if it was å*/, but as you see in the example there&#8217;s a space in between the å and the *. That&#8217;s a bug then isn&#8217;t it?</p>
<p>I had heard of the @charset rule but didn&#8217;t think there where any browser support for it. Is there?</p>
<p>This blog is more practical than adhearing to specifications :) Good comment, and thanks for pointing out my errors.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Niels Leenheer</title>
		<link>http://friendlybit.com/css/ie6-bug-encode-and-ignore/#comment-5664</link>
		<dc:creator>Niels Leenheer</dc:creator>
		<pubDate>Wed, 11 Oct 2006 20:56:27 +0000</pubDate>
		<guid isPermaLink="false">http://friendlybit.com/css/ie6-bug-encode-and-ignore/#comment-5664</guid>
		<description>Hi Emil,

I believe there are two fundamental mistakes in your article. First of all, this is not a bug and secondly, there are two ways to specify the encoding of an css stylesheet.

Let me explain. Western character encodings use a single byte for each character. UTF-8 uses multiple bytes. Some characters use a single byte, other two or three. The first byte of such a doublet or triplet is an indication of how many bytes that particular character is using. 

When you use the å character in one of the ISO-8859 encodings it will use the same byte value as the first byte in one of those UTF-8 multibyte characters. 

So IE treats the å as the start of a multibyte character. The next bytes are part of the same character. Now, if that next byte is the asterisk of the comment closing marker it will break the marker and the comment will simply never end. For example /*å*/ will become something like this: /*?/. The questionmark represents one multibyte UTF-8 character.

So, this is normal behavoir and certainly not a bug. IE just parses the stylesheet as instructed.

Secondly. There are two ways to specify the charset encoding of the stylesheet. First of all you can configure the server to tell the browser by using HTTP headers, or you could use the @charset "at-rule". For example, start your css file with: @charset "UTF-8";</description>
		<content:encoded><![CDATA[<p>Hi Emil,</p>
<p>I believe there are two fundamental mistakes in your article. First of all, this is not a bug and secondly, there are two ways to specify the encoding of an css stylesheet.</p>
<p>Let me explain. Western character encodings use a single byte for each character. UTF-8 uses multiple bytes. Some characters use a single byte, other two or three. The first byte of such a doublet or triplet is an indication of how many bytes that particular character is using. </p>
<p>When you use the å character in one of the ISO-8859 encodings it will use the same byte value as the first byte in one of those UTF-8 multibyte characters. </p>
<p>So IE treats the å as the start of a multibyte character. The next bytes are part of the same character. Now, if that next byte is the asterisk of the comment closing marker it will break the marker and the comment will simply never end. For example /*å*/ will become something like this: /*?/. The questionmark represents one multibyte UTF-8 character.</p>
<p>So, this is normal behavoir and certainly not a bug. IE just parses the stylesheet as instructed.</p>
<p>Secondly. There are two ways to specify the charset encoding of the stylesheet. First of all you can configure the server to tell the browser by using HTTP headers, or you could use the @charset &#8220;at-rule&#8221;. For example, start your css file with: @charset &#8220;UTF-8&#8243;;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
