from_str should ignore encoding in XML declaration #324
Labels
encoding
Issues related to support of various encodings of the XML documents
enhancement
help wanted
serde
Issues related to mapping from Rust types to XML
XML can be viewed as a binary format, for instance when parsed using from_reader from a sequence of bytes.
However, when parsing from a &str, the content is already guaranteed to be valid UTF-8.
In that case the encoding hint in the XML declaration should be ignored.
Here is a test that fails (make sure the source code is saved as UTF-8).
Test result:
The text was updated successfully, but these errors were encountered: