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: 2011-02-21 21:03 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:
Status: Open Package: XMLRPC-EPI related
PHP Version: 5.3.5 OS: *
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [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

Add a Patch

Pull Requests

Add a Pull Request

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
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Jun 27 06:01:31 2019 UTC