Re: CRLF in <string> -- XML vs XML-RPC

[email protected] 8 May 2007 15:23:14 +0000
Newsgroups gmane.text.xml.rpc.specification
Message-ID <[email protected]>
>by default I encode using &#xxxx; notation EVERY char outside ASCII
>range when sending. That means, for 8 bit charset (php defaults to
>iso-8859-1 basically), chars <= 32 and >= 160. It is the best solution
>I could come up to make sure the charset transcoding errors are kept
>to a minimum. Plus CR LF are always sent and received as-is.

>Note: the php application can, when using the lib, specify it desires
>to encode sent data as iso-8859-1 or UTF-8, in which case I do not
>convert \r or \n chars to their code point representation - and I do
>not normalize upon sending, either.

I can't see a difference between the default and the option.  When do
you send \r \n as the raw characters and when don't you?  When you say
"code point representation," which representation is that?  &#xxxx; ?

>when receiving, the php xml parser is used. It is expat-based. As
>far as I can tell, i does not normalize CR\LF while decoding

That's hard to believe.  You mean the conventional PHP XML parser
doesn't normalize CR/LF ever?  Considering 1) that the XML spec makes
it pretty clear that it's required; and 2) it's generally very useful,
I don't think it could get away with that.  Plus, I have an Expat
parser from 2001 that has the normalization integrated pretty tightly
into it.

-- 
Bryan Henderson                                   San Jose, California


 
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/