Re: Re: Problem with UTF-8

John Wilson <[email protected]> Fri, 14 Sep 2007 12:50:26 +0100
Newsgroups gmane.text.xml.rpc.specification
Message-ID <[email protected]>
On 14 Sep 2007, at 10:36, Gaetano Giunta wrote:

> if the server is in PHP, AND you are using the standard xmlrpc library
> (that is, the native xmlrpc extension) to build it (as far as I can
> tell), you can
> - use utf8_encode() on your php data before sending it to the xmlrpc
> encoding layer
> - use a header() call in your server php script to set Content-type:
> text/xml; charset=iso-8859-1 (note: syntax is by memory, it might be a
> little different)
> - send a modified xml prologue, as you proposed. Using "iso-8859-1"
> either will work.
>
> If you are using a different php xmlrpc implementation server side,
> chances are there is some support for charset encoding in your toolkit

Setting the charset on the HTTP Content-type header violates the XML- 
RPC spec and, in general, will have no effect on the behaviour of the  
client.

Most software I know of which consumes XML over HTTP will ignore the  
charset. The problem is that it is almost always wrong (e.g. it is  
omitted but the encoding of the document is not US-ASCII).

I'm pretty sure that Apache XML-RPC ignores the Content-type encoding.


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/