GNOME Bugzilla – Bug 443868
xsltproc has no way to specify input document encoding
Last modified: 2007-08-23 12:23:20 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.
Created attachment 89318 [details] [review] The patch
Created attachment 89320 [details] [review] The right patch Please disregard the previous patch. It has an error.
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