xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric van der Vlist <...@dyomedea.com>
Subject Setting the encoding type with Xerces [WAS: Setting the encoding type with Xalan]
Date Tue, 11 Apr 2000 15:05:22 GMT
Scott Boag/CAM/Lotus wrote:
> 
> Xalan just passes the InputSource structure to Xerces, who should handle
> the encoding value.
> 
> -scott
> 

Thanks, and sorry for the wrong direction...
I hope someone from Xerces will feel concerned then ;=)

------------ copy from previous mail ---------------

I'd like to be able to set the encoding of the XML files using Xalan
[which is passing the InputSource structure straight to Xerces].

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
------------------------------------------------------------------------

Mime
View raw message