Re: [xml] Serialization of documents without encoding
- From: Nick Wellnhofer <wellnhofer aevum de>
- To: "xml gnome org" <xml gnome org>
- Subject: Re: [xml] Serialization of documents without encoding
- Date: Tue, 25 Sep 2018 14:36:03 +0200
On 25/09/2018 13:19, Nick Wellnhofer wrote:
libxml2 serializes documents without an encoding declaration differently than
documents with an explicit UTF-8 encoding:
It seems that this was partially changed in 2005 with the following commit:
https://gitlab.gnome.org/GNOME/libxml2/commit/64354ea7d6b8e0d95f3f9bcfdc98bddd065b65fc
But this change only applies to text nodes, not attribute content. It also
only applies when serializing with xmlNodeDumpOutput or xmlNodeDump, not when
using the xmlSave API (which xmllint uses).
The whole situation is a mess. I'd love to change the code so that non-ASCII
chars are always encoded as UTF-8, but I'm scared to break things.
Nick
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]