Welcome to Zen_ar218's blogspot.

June 2, 2009

How to Change Database Collation to UTF-8

How to Change Database Collation to UTF-8


In some web hosting, They use Cpanel and Fantastico installer. It will automatic install your website and database. So You can not set your database collation by yourseft.

How to Change Database Collation 01

Cpanel Interface



Bad luck, Some web hosting set the default database collation to Latin Swedish. But if you wanna do Thai, Chinese, Korean Website. You need to set the collation of database to UTF-8.

How to Change Database Collation 02

How to change this!!!!



If the database is not UTF-8, The display of your language will not display correctly.

How to Change Database Collation 03

As you can see in this picture.



Don't worry there's a way :)


For changing the collation of database, You can manually do it in notepad or dreamweaver.
But it's not very easy to do. So I will explain you the easiest way:

Step 1. You have to download Tool from Phoca for Changing Collation (Click here to Download). It's very great.

Step 2. After finish downloading, Right click and extract the file to your PC. (If you have WinZip, or WinRAR, etc.)

How to Change Database Collation 04

Step 3. You will see the folder name tool_phoca_changing_collation.... (Tooooo long name). Rename the folder to collation.

How to Change Database Collation 05

How to Change Database Collation 06

Rename the folder name to collation



Step 5. Uploading the folder to the root of your website.

How to Change Database Collation 07


Step 6. Okay, It's almost finish... Open your web browser and enter this URL: (Yourdomainname/collation/index.php)

How to Change Database Collation 08


Step 7. You will see this screen appear.

How to Change Database Collation 09

Step 8. Enter the field and click Submit
  • Database Host: Enter your host name

  • Database User: Enter your username for connecting to database

  • Database Password: Enter your password

  • Database Name: Enter your database name

  • Database Collation: utf8_general_ci


Step 9. Finish!!! Now the database change to UTF-8, Check your website and see the language display!

How to Change Database Collation 10
How to Change Database Collation 11


Thanks, Phoca Team Developer for this great stuff!!! :)




Webmaster of Thai Othello Page

12 comments:

Unknown said...

WOW!!! Great thanks to you, I'm just suffering the same problem with my joomla.

Thanks again for your useful information!

zen_ar218 said...

You're Welcome :)

Simona said...

Thank you!!!!! Awsomee!!! I freaked out when i thought i had to edit EVERY table, this is a great thing :D

Unknown said...

Hi

sorry my friend but doesn't helps me. :(
I have one database with Mambo and PHP data.
Database is 7 years old, full of data.
After I applied your solution, everything wrote "OK" but when I refresh my webpage all data inside od database is gone.
I enter to mambo admin panel in check the items content, more or less all data inside of news is gone. :(

Please help. :)

zen_ar218 said...

Sorry, Sanel
I can not help you.

You should backup your website every week
or atleast every month...

And If you wanna do something with your database,
Don't forget to backup them first.


that's all.

Unknown said...

Hi there.
I made everything you said, but there is no change in collation, when chack it in phpmyadmin..
strange

Chronoleon said...

I wana confirm that the script is excelent. :)

Pelion - Tsagarada said...
This comment has been removed by the author.
Pelion - Tsagarada said...

when you say drop it to your root where exactly do you mean? (sorry i am a newbie)

and where i find the following info:
Database Host ??
Database User ?
Database Password ?
Database Name ?
Database Collation ?


thank you so much!

Pelion - Tsagarada said...

I GOT IT!!

GOD BLESS YOU!!!!!!!

what joomla forum and my host provider couldn't help me do in 2 days you help me did it in 10 minutes!!

THANK YOU!!!!!!!!!!!!!!!

Cristian said...

WARNING: I used phoca exactly as explained in this tutorial and lost my database, the way it happened to Sanel. It seems phoca only retains the beginning of each table. So if you have a website with short pages it might work, otherwise they WILL GET TRUNCATED. Definitely backup (dump) your database before trying this addon. If you use cPanel you may follow this tutorial: http://www.siteground.com/tutorials/php-mysql/mysql_export.htm

Better yet, don't use Phoca at all.

My 2 cents,
Cristian

Unknown said...

Thank you very much! I thought this was going to be impossible!!!

 
Copyright © 2008-2015 zen-ar218.blogspot.com - All rights reserved