Re: XmlSerializer
Aleksander Slominski <[email protected]>
| Newsgroups | gmane.text.xml.xmlpull.devel |
|---|---|
| Message-ID | <[email protected]> |
Stefan Haustein wrote:
> Hi,
>
> when the XmlSerializer is writing to a reader with unspecifyed encoding,
> I think we should require escaping all character codes > 127? Is that OK?
you mean to escape using XML entity character references (Ҽ ) right?
i do not know - shouldn't it be left to implementation? default XML encoding is
typically UTF8 and it can transfer any unicode character without need to
do XML entity escaping.
>
> This seems relatively safe and it is possible to use
>
> setOutput (OutputStream os, String enc)
>
> to avoid exessive escaping...?
actually another hint to serializer is
startDocument (String encoding, Boolean standalone) throws IOException;
where user can declare even for Writer what is intended XML encoding.
so i think that requiring it is not needed we should instead require
that every implementation takes into account encodings
passed in setOutput() and startDocument().
should we require both encodings to be identical?
thanks,
alek