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 443868 - xsltproc has no way to specify input document encoding
xsltproc has no way to specify input document encoding
Status: RESOLVED FIXED
Product: libxslt
Classification: Platform
Component: general
1.1.20
Other All
: Normal enhancement
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2007-06-04 10:15 UTC by Dražen Kačar
Modified: 2007-08-23 12:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The patch (2.27 KB, patch)
2007-06-04 10:16 UTC, Dražen Kačar
none Details | Review
The right patch (2.25 KB, patch)
2007-06-04 10:31 UTC, Dražen Kačar
none Details | Review

Description Dražen Kačar 2007-06-04 10:15:59 UTC
xsltproc doesn't have a command line option which can be used to specify input document character set. I stumbled upon this problem when using it on HTML file (via --html option). The character set might be known, but it doesn't have to be specified in the document (or it could be specified after the TITLE element, in which case libxml doesn't always use it), so I think a command line option should be added.

I wrote a patch (works for me :-) against libxslt 1.1.20 which adds --encoding option. I'm not sure if that's the best name. Maybe it should be called --inencoding or --docencoding.

The patch doesn't update the documentation. It looks like xsltproc.1 and xsltproc.html are being generated from some other source, but I don't know which.
Comment 1 Dražen Kačar 2007-06-04 10:16:41 UTC
Created attachment 89318 [details] [review]
The patch
Comment 2 Dražen Kačar 2007-06-04 10:31:01 UTC
Created attachment 89320 [details] [review]
The right patch

Please disregard the previous patch. It has an error.
Comment 3 Daniel Veillard 2007-08-23 12:23:20 UTC
I'm not that convinced it's a good idea, but the patch is simple,
it should not add failures and it may be useful occasionally, so 
I applied it and commited to SVN. I also updated the xsltproc.xml and
regenerated the man page.

 thanks !

Daniel