i'm returning data from database , the charset used in my website is
HTML Code:<meta http-equiv="Content-Type" content="text/html; charset=windows-1256" />
so everything is displayed well..
but the problem is when i return data from database which uses charset=tf8-8 is it displayed for me like '????????????????'
i looked at php manual and i sued this code which returns the data correctly
and also at the same time i changed the charset toPHP Code:$connection = mysql_connect($DBhost, $DBuser);
mysql_query("set names utf8", $connection);
HTML Code:<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
it works well but the rest of the page returns
Œأ¦أ‘أŒ
أ£أ*أ¤أ‡
أچأ“أ‡
1- so how to make a specific charset in a part of the page and the rest of the page uses another charset????
2- the codeaffect on the rest of the page and returns alsoPHP Code:$connection = mysql_connect($DBhost, $DBuser);
mysql_query("set names utf8", $connection);
Œأ¦أ‘أŒ
أ£أ*أ¤أ‡
أچأ“أ‡
note that i use another connection and another table
but the linePHP Code:$ii=mysql_connect($DBhost,$DBuser,$DBpass);
[php]
mysql_query("set names utf8", $connection);
[php] make a problem .. how to fix this problems????


Reply With Quote
Bookmarks