Going all UTF-8
Posted by: Rickard Andersson
Date: May 16, 2005 07:01AM

I'm the developer of a discussion board called PunBB (punbb.org). I'm considering switching to using UTF-8 only in the next major release of the board. However, my current user base is using anything from MySQL 3.23 to MySQL 5, so I need a portable way of migrating the data already in the databases to UTF-8. I've browsed around in the manual a bit, but I wasn't able to find any definitive answers on how to do this.

For MySQL 4.0 and earlier, I reckon I will have to extract the data, convert it to UTF-8 in PHP and then put it back in. This sounds like a real pain, but I can't think of any other way of doing this since MySQL isn't aware of UTF-8 at all in those versions.

For MySQL 4.1 and later, I really have no idea. Is there a way to easily convert all singlebyte string columns to UTF-8 in a MySQL database? I would like to avoid having to run an ALTER TABLE ... MODIFY on every single varchar/text column in the database.

I would appreciate any help you can give me on this.

Rickard Andersson

Options: ReplyQuote

Written By
Going all UTF-8
May 16, 2005 07:01AM
May 17, 2005 02:20AM
May 17, 2005 04:50AM
May 20, 2005 04:47PM
May 20, 2005 09:19PM
May 23, 2005 04:15AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.