Summary: | Regression: Bad encoding detection | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Sebastien <slaout> |
Component: | khtml parsing | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED NOT A BUG | ||
Severity: | normal | CC: | kde-2011.08 |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Sebastien
2005-03-23 19:58:34 UTC
It is because your page specifies UTF-8 to be the encoding: <?xml version="1.0" encoding="UTF-8"?> KDE 3.3 could not read xml-headers, but 3.4 can, and now follows your directive. Sorry, My friend changed the header AFTER I posted the bug and BEFORE you visited it. So, at first he haven't included any encoding and it was interpreted as UTF-8! Then, he changed to this: <?xml version="1.0" encoding="ISO-8859-1"?> and it doesn't work. (then he changed to UTF-8, what was not working, of course) And he changed back to encoding="ISO-8859-1" but it doesn't work. Can this bug be reopened? Perhapse it's because there is a blank line before the xml header? Sure Okay I found the source of the problem then. The web-server claims that the encoding is "UTF-8" by sending this HTTP header: Content-type: text/html; charset="utf-8" So we could fix it by letting the XML specified encoding take preference over HTTP specified ones. Of course you should fix the webserver under all circumstances. How does other browsers react? (I want to know the preferences of IE, Mozilla and Opera) That's a tie. Mozilla interpret it as ISO-8859-1. Pretty well. Opera intepret it as UTF-8. Bad. I don't want to reboot now to test with IE. Anybody? If I'm not mistaken, the recommended order is XML header -> HTTP header -> META tag. So far as I've understood, the recommended order for web browsers is HTTP header -> that's it. You can't even read the page if the HTTP header doesn't specify what encoding it is in, and parsing for an ASCII-compatible document is not the web browser's job. The XML header is for XML parsers that are _not_ web browsers, which could have any reason for parsing the page. The META tag is only used for pages saved locally, in which there is no HTTP header. This bug is invalid, as outlined in comment #7. |