The most likely cause is your web-service server NOT putting a correct charset specification in the HTTP headers that accompany the xmlrpc response you pasted below. There is no charset specification in the xml prologue (the <?xml ?> tag) of the response, either.
As per the HTTP standard, if you do not specify a charset, for content of type text/*, such as xmlrpc is, the assumed charset MUST be US-ASCII.
Lots of libraries break the spec, and the phpxmlrpc lib by defaults assumes that, when unspecified, the charset used by the partner is UTF-8.
If the xml parsing broke on your request, you are most likely not using UTF-8.
You are not using ASCII, either, because there are no accented chars in ascii ;)
My best guess is you are using ISO-8859-1, which is, luckily, pretty well supported by phpxmlrpc.
You should either:
1 - modify the server code to have it specify a correct charset, either in the HTTP headers or the xml prologue, or
2 - modify the server code to emit UTF-8 encoded data, or
3 - change one line of code in your php client:
after having included the file, set
If method 3 does not work, there might be some other problems I cannot decipher without a screen dump of the client debug mode.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Overpeer ---
Sent: Monday, February 06, 2006 4:21 PM
Subject: [phpxmlrpc] Accents in phpxmlrpc


Some of my functions return a accents vocals like 'á' or 'é' for example, then the phpxmlrpc return a error:

Fault: Code: 2 Reason 'Invalid return payload: enable debugging to examine incoming payload (XML error: not well-formed (invalid token) at line 16)'

The invalid token apperas always, when a accent vocal is in the return string, like this:

<?xml version="1.0"?>
      <value><string>Incidencia genérica</string></value>   <----- Line 16

How i can view this specials characters ???

A lot of thanks.
phpxmlrpc mailing list

Reply via email to