Encoding test (Re: Is this something for the primer?)

Manu, Gregg,

I have added a new test, #215, to test the encoding issue.

1. If I look at the test under the xhtml heading, then it passes my implementation. Indeed, 

http://rdfa.digitalbazaar.com/test-suite/test-cases/xhtml1/rdfa1.1/0215.xhtml

is returned with 

Content-Type: application/xhtml+xml

and the returned file includes

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

For application/xhtml+xml I use an XML parser, which properly establishes the UTF-8 encoding and everything is fine.

2. If I look at the test under the html heading, then my implementation fails and I would expect all implementations fail. Indeed, with the present setup, with

http://rdfa.digitalbazaar.com/test-suite/test-cases/html5/rdfa1.1/0215.xhtml

the encoding is not returned as part of the HTTP heading, so any HTML5 parser would fall back on content sniffing and this will fail in this case.

Bottom line: Manu, you should set the server up in such a way that HTML5 files return the content encoding, too. Ie, it should say

Content-Type: text/html; charset=UTF-8

then at least part of the implementations should be able to establish the correct encoding...

Cheers

Ivan

----
Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
PGP Key: http://www.ivan-herman.net/pgpkey.html
FOAF: http://www.ivan-herman.net/foaf.rdf

Received on Thursday, 21 April 2011 08:11:10 UTC