On Thursday, 29 August 2013 at 18:58:57 UTC, H. S. Teoh wrote:
On Thu, Aug 29, 2013 at 01:38:23PM -0400, Jonathan M Davis wrote:
[...]
Well, as I said, I couldn't remember exactly what the XML standard said about encodings, but if it can contain non-ASCII characters, then my first inclination is to say that it has to be UTF-8, UTF-16, or UTF-32 based on the fact that that's what we support in the language and in Phobos

Take a look here:

        http://www.w3schools.com/xml/xml_encoding.asp

XML files can have *any* valid encoding, including nastiness like windows-1252 and relics like iso-8859-1. Unfortunately, I don't think we have a way around this, since existing XML files out there probably already have all of these encodings are more, and std.xml is gonna hafta support 'em all. Otherwise we're gonna get irate users complaining "why can't std.xml parse my oddly-encoded-but-standards-compliant XML file?!"


As this is not the first time I see it used as a reliable source, no, w3school is full of shit. Don't use that website when looking for precise high quality information.

Reply via email to