note 100349 rejected from function.mysql-set-charset by danbrown

From: Date: Sun, 10 Oct 2010 15:51:01 +0000
Subject: note 100349 rejected from function.mysql-set-charset by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-173114@lists.php.net to get a copy of this message
Note Submitter: s_a_m104 at hotmail dot com ---- Hello I am trying to retrieve data from oracle into PHP and I have successfully accomplished that, but the data appeared in question marks (??????), so I add the AMERICAN_AMERICA.AR8MSWIN1256 to NLS language in the registry for oracle and now the data appears as (ÓÇãÑ ÝíáíÈ ÚíÏ ÇáÚÏíáí). I tried encoding and all suggested character sets from IE and from the PHP code but had no results. I would appreciate some support for this issue By the way anything else in the page that is not generated from the database and written in arabic appears arabic so i have no problem with that. Thank you This is my code <META CONTENT="text/html; charset=windows-1256" HTTP-EQUIV="Content-Type"> اهلاً و سهلان <?php $conn = oci_connect('MyUser', 'Password', 'Server/DataBase'); if (!$conn) { $m = oci_error(); echo $m["message"]; exit; } $stid = oci_parse($conn, "select Client_name, Client_no, Nationality from CLIENTS where Client_No = 8888888888"); oci_execute($stid); // Query the table echo "<table border='1'>"; while ($row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS)) { echo "<tr>"; foreach ($row as $item) { echo "<td>".($item!==null?htmlentities($item):"&nbsp;")."</td>"; } echo "</tr>".PHP_EOL; } echo "</table>"; oci_free_statement($stid); oci_close($conn); ?>

« previous php.notes (#173114) next »