News Feed
Jobs Feed
Sections




Recent Jobs

News Archive
Nessa's Blog:
Convert Database to UTF-8
December 13, 2007 @ 10:23:00

Nessa has posted a quick way to convert a database from whatever character set it's currently on over to UTF-8 with a handy PHP script.

When you're dealing with special characters in a database, you have to make sure that the charset and collation are dumped *with* the database, so that when you move it to another server the tables and data create properly. The biggest annoyance so far is converting tables back to UTF-8, as when this is done through the MySQL shell or phpmyadmin is had to be done table-by-table.

The script logs into the database and pulls all of the table information out (could be a lengthy list depending on the database) and runs an ALTER TABLE to change its character set to 'UTF8'.

0 comments voice your opinion now!
characterset utf8 convert alter database table characterset utf8 convert alter database table



Similar Posts

WebCheatSheet.com: Two New Tutorials - Database Export & Sending Email

Developer.com: Performing HTTP Geocoding with the Google Maps API

Lorna Mitchell's Blog: Introduction to Zend_Db

Zend Developer Zone: Zend Framework Hidden Gems: Zend_Db

PHPHacks.com: Creating charts with JGraph


Community Events









Don't see your event here?
Let us know!


feature framework release job zendframework extension codeigniter drupal conference apache microsoft performance opinion sqlserver symfony podcast developer windows wordpress facebook

All content copyright, 2010 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework