Edit report at http://bugs.php.net/bug.php?id=41650&edit=1
ID: 41650
Comment by: admin at mysterria dot com
Reported by: allan dot jensen at changenetworks dot dk
Summary: xmlrpc_encode_request() escapes utf-8 literally
Status: Open
Type: Feature/Change Request
Package: Feature/Change Request
PHP Version: 5.2.3
Block user comment: N
Private report: N
New Comment:
Have the same problem with PHP 5.3.5 CLI on Gentoo Linux. Unicode
symbols in russian are encoded wrong way.
Previous Comments:
------------------------------------------------------------------------
[2007-06-11 13:01:24] allan dot jensen at changenetworks dot dk
The test script should have € character encoded as utf-8 in order
to
work.
------------------------------------------------------------------------
[2007-06-11 13:00:06] 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>€</string>
</value>
</param>
</params>
</methodCall>
Actual result:
--------------
<?xml version="1.0" encoding="utf-8"?>
<methodCall>
<methodName>method</methodName>
<params>
<param>
<value>
<string>€</string>
</value>
</param>
</params>
</methodCall>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=41650&edit=1