I'm using a "fun" HTML special-character (✰)(see http://html5boilerplate.com/ for more info) for a Server
HTTP-header and am wondering if it is "allowed" per spec.
-
Using the Network Tab in the dev tools in Chrome on Windows Xp Pro SP 3 I see the ✰ just fine.
-
In IE8 the ✰ is not rendered correctly.
-
The w3.org HTML validator does not render it correctly (displays "
â°
" instead).
Now, I'm not too keen on character encodings … and frankly I don't really care too much about them; I just blindly use UTF-8 cus I'm told to. 🙂
Is the disparity caused by bugs in the different parsers/browses/engines/(whatever-they-are-called)?
Is there a spec for this or maybe a list of allowed characters for an HTTP-header "value"?
Best Answer
In short: Only ASCII is guaranteed to work. Some non-ASCII bytes are allowed for backwards compatibility, but are not supposed to be displayable.
HTTPbis gave up and specified that in the headers there is no useful encoding besides ASCII:
Previously, RFC 2616 from 1999 defined this:
and RFC 2047 is the MIME encoding, so it'd be:
but I don't think that many (if any) clients support it.