note 100349 added to function.mysql-set-charset
| From: | s_a_m104 at hotmail dot com | Date: | Sun, 10 Oct 2010 08:08:12 +0000 |
| Subject: | note 100349 added to function.mysql-set-charset | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-173110@lists.php.net to get a copy of this message | ||
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):" ")."</td>";
}
echo "</tr>".PHP_EOL;
}
echo "</table>";
oci_free_statement($stid);
oci_close($conn);
?>
----
Server IP: 69.147.83.197
Probable Submitter: 194.165.149.122
----
Manual Page -- http://www.php.net/manual/en/function.mysql-set-charset.php
Edit -- https://master.php.net/note/edit/100349
Del: integrated -- https://master.php.net/note/delete/100349/integrated
Del: useless -- https://master.php.net/note/delete/100349/useless
Del: bad code -- https://master.php.net/note/delete/100349/bad+code
Del: spam -- https://master.php.net/note/delete/100349/spam
Del: non-english -- https://master.php.net/note/delete/100349/non-english
Del: in docs -- https://master.php.net/note/delete/100349/in+docs
Del: other reasons-- https://master.php.net/note/delete/100349
Reject -- https://master.php.net/note/reject/100349
Search -- https://master.php.net/manage/user-notes.php