on Thu, 17 Jul 2003 15:16:22 +0100 "John Wilson" <[EMAIL PROTECTED]>
wrote:

> rufio wrote:
> <cut>
> > I don't see your problem. All you have to do is split what changes
> > and what stay constant: generating string containing a XML messge is
> > constant so framework does that;
> > encoding may change, and besides it's rather low level issue, so
> > transport layer should encode the message.
> 
> No you don't see the problem I'm afraid. The actual Java strings
> produced are different for different encodings. For UTF-8 and UTF-16
> everything is just fine and the standard Java Writer implementations
> will do the encoding. For US-ASCII and ISO 8859-1 the XML writer has
> to be aware of the encoding being uses and generate the appropriate
> character references for Unicode characters which are not part of the
> character set used for the encoding. You can't write a general XML
> write without knowing what encoding is being used.

I mentioned before that plugin should provide it's own Writer.
I imagine this would work like this:
 - framework constructs invalid (prologless) message encoded in UTF8
(internal java encoding)
- then writes the message to writer provided by plugin, which knows how
to enode it.

i.e. framework shouldn't care about encoding.

Reply via email to