Note that there are some explanatory texts on larger screens.

plurals
  1. POCJK White Space Characters Disappearing
    primarykey
    data
    text
    <p>I have a PHP script which fetches data from Salesforce via the Salesforce API and writes the output to a file using file_put_contents. The data is a mixture of Korean characters and English characters.</p> <p>When I run the script on a box (1) running Red Hat Enterprise Linux ES release 4 (Nahant Update 8) with PHP 5.2.8 and a similar box (2) running PHP 5.3.6 the spaces in between the Korean characters disappear.</p> <p>e.g. (Using K to represent a Korean character and E to represent an English character)</p> <p>EEEEEEEEK KKK KKKK EEE KKKK is appearing as EEEEEEEEKKKKKKKK EEE KKKK</p> <p>However when I run the script on a box (3) running CentOs with PHP 5.3.5 or on (4) my local windows machine with PHP 5.3.6 the text in the file is correct.</p> <p>Can anyone suggest what the problem might be?</p> <p><strong>EDIT</strong> - Originally I was accessing the php script via a browser however to (hopefully) simplify the problem I am currently storing the output in a text file and downloading it to my windows machine.</p> <p><strong>EDIT</strong> - Hex version</p> <p>Original text - CFD란 무엇입니까?</p> <p>Hex from (1) - 43 46 44 eb 9e 80 eb ac b4 ec 97 87 ec 9e 85 eb 8b 88 ea b9 8c 3f</p> <p>Hex from (3) - 43 46 44 eb 9e 80 20 eb ac b4 ec 97 87 ec 9e 85 eb 8b 88 ea b9 8c 3f</p> <p><strong>EDIT</strong> - Code used to select text (with user, pass, table, id and path omitted)</p> <pre><code>&lt;?php ini_set("soap.wsdl_cache_enabled", "0"); require_once ("../soapclient/SforcePartnerClient.php"); require_once ("../soapclient/SforceHeaderOptions.php"); $partner_wsdl = "../soapclient/new-partner.wsdl.xml"; $client = new SforcePartnerClient(); $client-&gt;createConnection($partner_wsdl); $loginResult = $client-&gt;login('--user--', '--pass--'); $query = "Select Name FROM --table-- WHERE Id = '--id--'"; $response = $client-&gt;query($query); echo'&lt;pre&gt;';print_r($response);echo'&lt;/pre&gt;'; $queryResult = new QueryResult($response); foreach ($queryResult-&gt;records as $qr) { $content = $qr-&gt;fields-&gt;Name; file_put_contents('--path--',$content); } ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload