On Fri, 2005-04-29 at 02:05 +0200, Jochen Wiedmann wrote:
> Hi, Daniel,
>
> if I get your patch right, then the the character handling is a matter
> of encoding only. However, if that's the case ...
>
> > + if (isUnicode)
> > + {
> ...
> > + }
> > + else
> > + {
> > + throw new XmlRpcException(0, "Invalid character
> > data "
> > + + "corresponding to XML "
> > + + "entity &#"
> > + + String.valueOf((int) c)
> > + + ';');
> > + }
>
> then I see no reason to throw an exception here. One should simply fall
> back to writing a numeric entity reference, as in the case "c < 0x20".
> Or do I get things wrong?
Ignoring the encoding="..." XML header, that would indeed be valid XML.
However, when the XML is subsequently processed, the entity-encoded
value will transformed into ASCII. Since there is no equivalent 7 bit
ASCII character which fits within that range (e.g. 0x7f is ASCII 127), a
parse error will be generated.
Jochen, thanks a lot for taking the time to look the patch over.
- Dan