See also:
See also:
See also:
How to modify a database from ISO-XXXX to UTF-8
This article is written by erpe
The task
Since years the standard charset is moving from country-based charsets to standard charsetcode UTF-8. If you are forced to modify your database from iso to utf the following "howto" may help you. It is strongly recommended to backup your database before starting in case something is going wrong. Additionally please take care that noone is working on your database during setup. It is a good idea to block the whole site. |
PHPMyAdmin
First a software is needed to work on your database. Normally phpMyAdmin is available on most webspaces. Please call the URL to phpMyAdmin in your browser and login into your database. Then call the specific database. |
|
phpMyAdmin: this is how the db looks like | |
Export database
Edditor: search and replace
Delete tables
Return now to your database in phpMyAdmin and delete all tables of your database. NOTICE: delete only tables, NOT the database itself. |
|
phpMyAdmin: delete all tables | |
Modify database
phpMyAdmin: click on the tab "SQL" and modify the database using following call: ALTER DATABASE `database_name` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; |
|
phpMyAdmin: modify database | |
Insert tables again
After success click again on the SQL Tab. Copy & paste all modified tables from local editor into the sql window and click "ok". |
|
phpMyAdmin: insert all tables | |
(nearly) done!
If inserting was successfull please click the database to see all tables. The modified tables should look similar to that in the image on the right. |
|
phpMyAdmin: tables after inserting | |
At last
Please make sure that utf-8 is standard charset in the "settings/advanced settings". Have a look at the generated source code to see, if there are some notices about the old charset. Prove the frontend of your site/pages if there are any "wrong" signs. Congratulation, you are done, utf-8 ist standard charset of you installation! If there are any further questions try your favourite searchmachine.... |