Bug #75416 [NEW]: Hebrew carecher dont convert as aspected

From: Date: Sun, 22 Oct 2017 16:31:52 +0000
Subject: Bug #75416 [NEW]: Hebrew carecher dont convert as aspected
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-211821@lists.php.net to get a copy of this message
From:             nir at ccc dot co dot il
Operating system: centos 7 / windows 10
PHP version:      7.0.24
Package:          XMLRPC-EPI related
Bug Type:         Bug
Bug description:Hebrew carecher dont convert as aspected 

Description:
------------
---
From manual
page:http://php.net/manual/en/function.xmlrpc-encode-request.php

---

the convert from array to xmlrpc_encode_request dont convert the hebrew
characters as need to 

after convert to xmlrpc_request 
the word שלום looks like this : 
 שלום -- wrong encoding 

the word Hello looks good
Hello



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


$array= [
            ['Server' => 'BM',
                'Method' => test,
                'Params' => ['שלום',hello,12],
            ]
        ];

$bug = xmlrpc_encode_request('Execute', $array, ['encoding' =>
'utf-8',
'version' => 'xmlrpc']);


?>


Expected result:
----------------
the name: שלום looks incorrect with wrong chars

the name: hello  looks good


 <?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>Execute</methodName>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>Server</name>
     <value>
      <string>BM</string>
     </value>
    </member>
    <member>
     <name>Method</name>
     <value>
      <string>test</string>
     </value>
    </member>
    <member>
     <name>Params</name>
     <value>
      <array>
       <data>
        <value>
         <string>שלום</string>
        </value>
        <value>
        <string>hello</string>
         </value>
       </data>
      </array>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodCall>

Actual result:
--------------
 <?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>Execute</methodName>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>Server</name>
     <value>
      <string>BM</string>
     </value>
    </member>
    <member>
     <name>Method</name>
     <value>
      <string>test</string>
     </value>
    </member>
    <member>
     <name>Params</name>
     <value>
      <array>
       <data>
        <value>
        
<string>&#215;&#169;&#215;&#156;&#215;&#149;&#215;&#157;</string>
        </value>
        <value>
        <string>hello</string>
         </value>
       </data>
      </array>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodCall>

-- 
Edit bug report at https://bugs.php.net/bug.php?id=75416&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=75416&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=75416&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=75416&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=75416&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=75416&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=75416&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=75416&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=75416&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=75416&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=75416&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=75416&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=75416&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=75416&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75416&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=75416&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=75416&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=75416&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75416&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=75416&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=75416&r=mysqlcfg



Thread (6 messages)

« previous php.bugs (#211821) next »