After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 67229 - xmllint bug with --format option and character encoding
xmllint bug with --format option and character encoding
Status: VERIFIED FIXED
Product: libxml
Classification: Deprecated
Component: general
unspecified
Other Linux
: Normal minor
: ---
Assigned To: Daniel Veillard
Daniel Veillard
Depends on:
Blocks:
 
 
Reported: 2001-12-19 08:05 UTC by Morus Walter
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Morus Walter 2001-12-19 08:05:45 UTC
There is (IMHO) a minor bug, when using xmllint with the --format
option and a non utf-8 character encoding.

When I do xmllint --format on a file like
--
<?xml version="1.0" encoding="iso-8859-1"?>
<bla>Ä</bla>
--
xmllint outputs the document in utf-8 without removing the encoding
declaration.

I think it should either preserve the encoding (like xmllint does, when
it's called without --format option) or output a correct encoding declaration.

(2878 ~) xmllint --version
xmllint: using libxml version 20411

(BTW: is it intended, that xmllint outputs usage info, when called
with the --version option?)
Comment 1 Daniel Veillard 2002-01-13 20:34:44 UTC
The first one is actually a serious bug because the result
is not well-formed XML. The patch is relatively simple:

http://cvs.gnome.org/bonsai/cvsquery.cgi?module=gnome-xml&branch=HEAD&branchtype=match&dir=gnome-xml&file=&filetype=match&who=veillard&whotype=match&sortby=Date&hours=&date=explicit&mindate=01%2F13%2F02+15%3A31&maxdate=01%2F13%2F02+15%3A33&cvsroot=%2Fcvs%2Fgnome

the second one was fixed too in CVS last week.

  thanks !

Daniel
Comment 2 Daniel Veillard 2002-01-15 18:32:52 UTC
Both should be closed in 2.4.13

 thanks,

Daniel