After the upgrade to Drupal 7.31 we are always getting a error for XML-RPC calls with "Parse error. Not well formed".

Checking the Code its because of the latest SA. We are expecting ISO-8859-1 from the XML-RPC, but the parser doesn't know about that anymore and always expects UTF-8 text. If you have for example nice german umlauts in it, it always throws "Invalid Character".

I propose to add a option 'encoding' to xmlrpc() to add the expected encoding. Then the result is converted to utf-8 and the parser goes through. I'm not sure how to handle older php versions, as xml_parser_create() defaults now to utf-8, but before 5.0.2 it was ISO-8859-1.

I will attach my current patch, which I used to get our system running again.

CommentFileSizeAuthor
#1 xmlrpc_encoding-2320433-1.patch2.36 KBkfritsche
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kfritsche’s picture

Status: Active » Needs review
FileSize
2.36 KB

Here my current solution, which can be discussed.