W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > July to September 2002

RE: <?xml version="1.0" encoding="UTF-8"?>

From: Jukka Korpela <jukka.korpela@tieke.fi>
Date: Mon, 29 Jul 2002 09:27:01 +0300
Message-ID: <621574AE86FAD3118D1D0000E22138A95BDD92@TIEKE1>
To: "WAI List (E-mail)" <w3c-wai-ig@w3.org>

jonathan chetwynd wrote:

> <?xml version="1.0" encoding="UTF-8"?>
> *is rendered as text.

That happens on a few browsers, which have no idea of XML (or correct SGML
parsing for that matter). 

> is there a workaround? 

Omit the processing instruction <?xml version="1.0" encoding="UTF-8"?>
This can be done if the encoding is UTF-8 (or UTF-16). Note that you cannot
do this if your document actually uses e.g. ISO-8859-1 so that you enter
accented characters "as such" and not using character references or entity
references. But if you only use Ascii characters, you can claim your
document to be UTF-8 encoded.

The XHTML 1.0 specification implicitly but clearly says that the instruction
can be omitted to circumvent the problem:

"C.1 Processing Instructions
Be aware that processing instructions are rendered on some user agents. 
However, also note that when the XML declaration is not included in a 
document, the document can only use the default character encodings UTF-8 or

UTF-16." - http://www.w3.org/TR/xhtml1/#guidelines

> am I the only mug bothering with this?

No, this problem has often been discussed on different fora, such as
news:comp.infosystems.www.authoring.html and news:alt.html
(And it's not really an accessibility problem specifically.)

Jukka Korpela, senior adviser
TIEKE Finnish Information Society Development Centre
Phone: +358 9 4763 0397 Fax: +358 9 4763 0399 
Received on Monday, 29 July 2002 02:23:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:36:10 UTC