Closed astuanax closed 11 years ago
Makes sense.
Would you mind sending a pull request with this fix?
Thanks.
Ok, I hope I managed to get this pull-request right. Let me know if it worked, or if you need anything else. https://github.com/atutor/AChecker/pull/28
Thx / Len.
Hi,
In some cases where the webpage is served with XHTML, UTF-8, but really serving ISO-8859-1, the XML that is returned, when selecting output=REST, becomes invalid.
It is full of â entities. [quote]It is an encoding issue. The non-breaking space, encoded in UTF-8 (the document makes the claim to be in UTF-8) is hex C2A0 (two bytes) but in ISO-8859-1 it is hex A0 (one byte). My browser thinks your page is ISO-8859-1. This is due to the Content-type header being incorrect.[quote] http://ncsuwebdev.ning.com/forum/topics/the-case-of-the-mysterious
I would suggest the following change as shown in this diff:
--- RESTWebServiceOutput.class.php (saved version) +++ (current document) @@ -36,7 +36,7 @@
-'<?xml version="1.0" encoding="ISO-8859-1"?> +'<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE resultset[ <!ELEMENT resultset (summary,results)> <!ELEMENT summary (status,sessionID,NumOfErrors,NumOfLikelyProblems,NumOfPotentialProblems,guidelines)> @@ -65,6 +65,7 @@ <!ENTITY amp "&"> <!ENTITY apos "'"> <!ENTITY quot """> +<!ENTITY nbsp " " > ]>