[xml] Serialization of documents without encoding
- From: Nick Wellnhofer <wellnhofer aevum de>
- To: "xml gnome org" <xml gnome org>
- Subject: [xml] Serialization of documents without encoding
- Date: Tue, 25 Sep 2018 13:19:51 +0200
libxml2 serializes documents without an encoding declaration differently than
documents with an explicit UTF-8 encoding:
$ echo '<?xml version="1.0"?><doc>Käse</doc>' |xmllint -
<?xml version="1.0"?>
<doc>Käse</doc>
$ echo '<?xml version="1.0" encoding="utf-8"?><doc>Käse</doc>' |xmllint -
<?xml version="1.0" encoding="utf-8"?>
<doc>Käse</doc>
Since the encoding should default to UTF-8, can anyone explain why this
decision was made?
Nick
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]