Recure Posted May 12, 2010 Share Posted May 12, 2010 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 ????". 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 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 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: set character_set_server='utf8'; set names 'utf8'; or <?php mysql_connect($db_hostname, $db_username, $db_password); mysql_query("set names 'utf8';"); // The rest of you php code! ?> Thanks for taking the time to read such a long post and sorry for making it too long. Thanks! Recure. Quote Link to comment https://forums.phpfreaks.com/topic/201446-i-need-help-encoding-a-script-to-utf8/ Share on other sites More sharing options...
beta0x64 Posted May 17, 2010 Share Posted May 17, 2010 I am not sure how the Gen4 script works, but I would like to point out the following function: http://www.php.net/manual/en/function.mb-convert-encoding.php Also, http://www.php.net/manual/en/function.mb-http-output.php You need to find where the text is output in order to convert the encoding. This might be a great undertaking, and the necessary script probably should have been a serious consideration before making a purchase! Quote Link to comment https://forums.phpfreaks.com/topic/201446-i-need-help-encoding-a-script-to-utf8/#findComment-1059639 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.