You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Kevin Ho <km...@hotmail.com> on 2003/04/11 01:35:05 UTC
betwixt BeanWriter charset encoding
Why is there no method in the BeanWriter class to set the charset encoding
for the XML stream to be written?
I looked at the source and the the only use of OutputStreamWriter (when
using BeanWriter with an OutputStream) is with the single argument
OutputStreamWriter constructer which uses the default character encoding.
BeanWriter
----------
public BeanWriter(OutputStream out) {
this.writer = new BufferedWriter( new OutputStreamWriter( out ) );
OutputStreamWriter
------------------
OutputStreamWriter(OutputStream out)
OutputStreamWriter(OutputStream out, String charsetName) // overload
// to use this version?
There is a method that let's you set the encoding attribute in the XML
declaration, but not one to set the 'actual' encoding. Therefore there would
be a mismatch if you set the XML declaration encoding attribute to anything
other than the default charcater encoding of your JVM.
_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail