Re: How to fetch unicode character from MySQL?
//Tareq
Some days ago i tried to fetch some posts from a punBB database. the value was in bangla. ...................
hellow tareq...
I think i can help you.first you have to change ur "meta" tag in html form.
paste the following code :
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
</head>Now you have to add two more lines in your punBB php code just after database connection:
mysql_query('SET CHARACTER SET utf8');
mysql_query("SET SESSION collation_connection='utf8_general_ci'") or die (sql_error());go to phpmyadmin and change your database and tables to "utf8_general_ci";
Now you can fetch data in any way..
I think thats all.....see what happens and let me know the result...................thankxxxxx
Re: How to fetch unicode character from MySQL?
Hmmm.bt when u use simple html form u have2chng the meta.otherwise u cant retrive long data & phpmyadmin may show u some ascii values!!!!!!!:p
Re: How to fetch unicode character from MySQL?
I used the both queries, but still had some problems. When i use the unicode variables, when passing them to other queries, i got some problems. Then i used
mysql_query("set names 'utf8'");with replacing
mysql_query('SET CHARACTER SET utf8');
mysql_query("SET SESSION collation_connection='utf8_general_ci'") or die (sql_error());and they worked fine ![]()