Bug #71501 [Opn->Csd]: xmlrpc_encode_request ignores encoding option

From: Date: Thu, 04 Feb 2016 10:46:02 +0000
Subject: Bug #71501 [Opn->Csd]: xmlrpc_encode_request ignores encoding option
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-199051@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71501&edit=1

 ID:                 71501
 Updated by:         nikic@php.net
 Reported by:        letrunghieu dot cse09 at gmail dot com
 Summary:            xmlrpc_encode_request ignores encoding option
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            XMLRPC-EPI related
 PHP Version:        7.0.0
 Block user comment: N
 Private report:     N

 New Comment:

Automatic comment on behalf of letrunghieu.cse09@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ace71b4c5feb986dd6a4a231bd738d83b41826ab
Log: Fix bug #71501


Previous Comments:
------------------------------------------------------------------------
[2016-02-03 06:23:00] letrunghieu dot cse09 at gmail dot com

Test with PHP 7.0.0.

------------------------------------------------------------------------
[2016-02-03 05:56:11] letrunghieu dot cse09 at gmail dot com

Description:
------------
The xmlrpc_encode_request function ignores the value of encoding and
escaping output options if users do not use a explicit value for the
version option when calling.

Note: The xmlrpc extension must be loaded first.

Test script:
---------------
<?php

$params = 'Lê Trung Hiếu';

echo xmlrpc_encode_request('foo', $params, ['encoding' => 'UTF-8',
'escaping' => 'markup']);

Expected result:
----------------
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>foo</methodName>
<params>
 <param>
  <value>
   <string>Lê Trung Hiếu</string>
  </value>
 </param>
</params>
</methodCall>


Actual result:
--------------
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>foo</methodName>
<params>
 <param>
  <value>
   <string>L&#195;&#170; Trung Hi&#225;&#186;&#191;u</string>
  </value>
 </param>
</params>
</methodCall>


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=71501&edit=1


Thread (3 messages)

« previous php.bugs (#199051) next »