Jump to content

I need help encoding a script to UTF8


Recure

Recommended Posts

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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.