I need help encoding a script to UTF8
Posted: Tue May 11, 2010 8:20 pm
Hi,
I bought the script Gen4 weeks ago, and after installing it I noticed that it does not support any added Arabic characters, they turn into symbols.
The problem was in my database too, but after changing the encoding of the database and all its tables from latin1 to utf8_general_ci, it got fixed, only on the database.
But the problem was still going in the script, when I type any Arabic word in the script from admin-panel it changes to symbols, and when I add Arabic words from the database it shows as question marks on the main page.
If you check my site right now (rb7net.net) you'll notice that the name of the site is showing as "RB7 ????"(four question marks instead of four Arabic letters.) I tried many ways but none of them worked, like:
1) changing the encoding of the database like I mentioned above
2) tried adding the following code to the file header.php in the theme folder
3) used the program Rapid PHP Editor and changed the encoding of every single php file in the script to "UTF-8 without ROM"
---
I believe that the thing I'm missing is a code I should add to the config.php or db.php files. something like:
or
Thanks for taking the time to read such a long post and sorry for making it too long.
Thanks!
Recure.
I bought the script Gen4 weeks ago, and after installing it I noticed that it does not support any added Arabic characters, they turn into symbols.
The problem was in my database too, but after changing the encoding of the database and all its tables from latin1 to utf8_general_ci, it got fixed, only on the database.
But the problem was still going in the script, when I type any Arabic word in the script from admin-panel it changes to symbols, and when I add Arabic words from the database it shows as question marks on the main page.
If you check my site right now (rb7net.net) you'll notice that the name of the site is showing as "RB7 ????"(four question marks instead of four Arabic letters.) I tried many ways but none of them worked, like:
1) changing the encoding of the database like I mentioned above
2) tried adding the following code to the file header.php in the theme folder
Code: Select all
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">---
I believe that the thing I'm missing is a code I should add to the config.php or db.php files. something like:
Code: Select all
set character_set_server='utf8'; set names 'utf8';Code: Select all
<?php mysql_connect($db_hostname, $db_username, $db_password); mysql_query("set names 'utf8';"); // The rest of you php code! ?>Thanks!
Recure.