[XML-SIG] Re: Encoding again
veillard at redhat.com
Mon Apr 19 18:03:18 EDT 2004
On Mon, Apr 19, 2004 at 07:52:39PM +0200, Fredrik Lundh wrote:
> Eustaquio Rangel de Oliveira Jr. wrote:
> > But using libxml and Python to make this gives me weird chars. What
> > could be happening here? Using encode/decode on the result string gives
> > me a "UnicodeError: ASCII decoding error: ordinal not in range(128)".
> what's the output encoding? the XML default is UTF-8, which tends to
> look as weird characters if you view them as ISO-8859-1.
> check if you can specify the encoding when you're saving the file (according
> to the libxml2 docs, xmlSaveFileEnc and xmlSaveFileTo both take encoding
yes but xmlSaveFile... is not used directly, you need to use the
XSLT related serialization routine since the encoding= and method=
information are stored in the stylesheet and not in the resulting tree.
If the command line xsltproc shows the problem, then it sounds
like a bug, please report it http://xmlsoft.org/XSLT/bugs.html
if the command line tool does it right then it sounds more like a
problem about using libxml2 API.
Daniel Veillard | Red Hat Desktop team http://redhat.com/
veillard at redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
More information about the XML-SIG