php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #41650 xmlrpc_encode_request() escapes utf-8 literally
Submitted: 2007-06-11 13:00 UTC Modified: 2021-04-13 13:53 UTC
Votes:12
Avg. Score:4.6 ± 0.8
Reproduced:12 of 12 (100.0%)
Same Version:5 (41.7%)
Same OS:3 (25.0%)
From: allan dot jensen at changenetworks dot dk Assigned: cmb (profile)
Status: Wont fix Package: XMLRPC-EPI related
PHP Version: 5.3.5 OS: *
Private report: No CVE-ID: None
 [2007-06-11 13:00 UTC] allan dot jensen at changenetworks dot dk
Description:
------------
xmlrpc_encode_request XML-escapes literally without first converting 
to UTF-16 as required.

Once fixed the default option should also be changed from escaping 
non-ascii, to escaping non-encodable

Reproduce code:
---------------
xmlrpc_encode_request('method', '€', array('encoding'=>'utf-8'));

Expected result:
----------------
<?xml version="1.0" encoding="utf-8"?>
<methodCall>
<methodName>method</methodName>
<params>
 <param>
  <value>
   <string>&#8364;</string>
  </value>
 </param>
</params>
</methodCall>


Actual result:
--------------
<?xml version="1.0" encoding="utf-8"?>
<methodCall>
<methodName>method</methodName>
<params>
 <param>
  <value>
   <string>&#226;&#130;&#172;</string>
  </value>
 </param>
</params>
</methodCall>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-06-11 13:01 UTC] allan dot jensen at changenetworks dot dk
The test script should have &#8364; character encoded as utf-8 in order to 
work.
 [2011-02-21 21:03 UTC] jani@php.net
-Package: Feature/Change Request +Package: XMLRPC-EPI related -Operating System: +Operating System: * -PHP Version: 5.2.3 +PHP Version: 5.3.5
 [2021-04-13 13:53 UTC] cmb@php.net
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2021-04-13 13:53 UTC] cmb@php.net
The xmlrpc extension is unbundled and moved to PECL as of PHP
7.4.0.  I'm temporarily maintaining the extension, but I will not
do any feature additions.  Actually, everybody is likely better
off to switch to something else.  Thus, I'm closing this ticket.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC