Re: CRLF in <string> -- XML vs XML-RPC
John Wilson <[email protected]> Wed, 9 May 2007 11:02:48 +0100
| Newsgroups | gmane.text.xml.rpc.specification |
|---|---|
| Message-ID | <[email protected]> |
If it is of interest this is how I handle encoding the the Groovy
implementation:
Characters with values less than 0X20 but not equal to 0X09 0X0A or
0X0D cause an exception to be thrown and no data is sent
Characters with values greater than 0XD800 and not greater than or
equals to 0XE000 and less than 0XFFFE cause an exception to be
thrown and no data is sent
The characters '<", ">" and '&' are encoded as <, > and &
Other characters with value less than or equal to 0XFF get sent "as
is" (including 0X09 0X0A and 0X0D)
All others get represented as &#x....; entities
I do this no matter that the encoding of the document is set to.
So I always send "well formed" XML.
I should probably be more conservative and encode everything > 0XEF
so that implementations which don't understand UTF-8 but do
understand numeric character entities will be able to process the
message.
John Wilson
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/xml-rpc/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/xml-rpc/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[email protected]
mailto:[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/