The following mini script is used to convert existing database tables to UTF-8. Upload the script to your account as "convert.php" and modify the database connection parameters and the character set, then execute the script.To execute the script, you simply would visit the script in any web browser. If you upload the file to your public_html folder you'd visit http://yourdomain.com/convert.php. Dont forget to replace yourdomain.com with your actual domain name. 

 

Of course, you can use this script to change the database to any character set you wish. You need to define the character set in the script to change character sets:

$char_set = 'character set';

You will need the change the  utf8_general_ci to match the character set you defined in the step above. So if you wanted to change the character set to hebrew you'd change the line to:

$sql = "ALTER TABLE $table DEFAULT CHARACTER SET $char_set COLLATE hebrew_general_ci";

For more information on MySQL character sets and collation please see the following link:

Character Sets and Collations in MySQL

If you need further assistance please feel free to contact our support department.

Did you find this article helpful?

Login to comment.

Your Opinion Matters

... but we need to know what you're thinking!

The Community Support team wrote the article you're looking at now. We like to think it's perfect, but we're sure you have some suggestions. Please, let us know what they are!

Feedback
Your Email Address
Because we'd like to talk with you!

Have a Question?

If you need some help, submit your question to our Community! We guarantee a response within 60 minutes (8am - 9pm EST, Monday - Friday)

Recent Questions

  1. Site under brute force attack
  2. URLs in Installation of WordPress Don't Redirect
  3. Choosing a Directory With WordPress

Support Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.