You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Eric van der Vlist <vd...@dyomedea.com> on 2000/04/07 09:26:36 UTC
Setting the encoding type with Xalan
Hi,
I'd like to be able to set the encoding of the XML files using Xalan
(command line).
I have created an updated version of the Process class to use the
InputSource.setEncoding() method :
-----------
XSLTInputSource is = new XSLTInputSource();
is.setEncoding("iso-8859-1");
is.setSystemId(inFileName);
Node sourceTree = processor.getSourceTreeFromInput(is);
stylesheet.process(processor, sourceTree, new
XSLTResultTarget(outputStream));
System.out.println("encoding : "+ is.getEncoding());
-----------
The trace (last line) is showing the encoding has been taken into
account, but there seem to be no effect on the result (characters are
still not read as iso-8859-1 from the input file).
Do you have any idea of what may be happening ?
Thanks
Eric
--
------------------------------------------------------------------------
Eric van der Vlist Dyomedea http://dyomedea.com
creator http://xmlfr.org http://ducotede.com
editor http://xmlhack.com http://dmoz.org
------------------------------------------------------------------------