Is this the only way? I was hoping that phpMyAdmin would have a nice function for this. What is the reason for not being able to use String types when using UFT-8? Maybe I have to learn more about the UFT-8 to find the answer about that?
Best regards, Peter Lauri _____ From: Gabriel PREDA [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 14, 2006 6:30 PM To: mysql@lists.mysql.com Cc: Peter Lauri Subject: Re: Converting database and its tables to UTF-8 Hi Peter, That will be a lot of work ! 1. First make a back-up... it's always a good ideea ! 2. For every table in the database alter String Types into BINARY string types that means: - (VAR)CHAR(M) will become (VAR)CHAR(M) BINARY or (VAR)BINARY(M) - TINYTEXT, TEXT, MEDIUMTEXT, and LONGTEXT will become respectively TINYBLOB, BLOB, MEDIUMBLOB, and LONGBLOB 3. Alter the database isuing ALTER DATABASE `database_name` DEFAULT CHARACTER SET utf8; 4. Alter each table issuing: ALTER TABLE `table_name` DEFAULT CHARSET=utf8; 5. Alter back the column types. This should do it ! And because you issued the ALTER DATABASE from now on all tables in that database will be in utf8 ... and falling down any column will be utf8 if you don't specify explicitly anything else... Yes you can have a charset on the database in that database tables with different chartsets and even in a table you can have columns with other chartsets... Gabriel PREDA -------------------- Senior Web Developer On 2/14/06, Peter Lauri <[EMAIL PROTECTED]> wrote: Hi, I have a database with around 40 tables that needs to be converted to UTF-8 to support multi languages. What is the best procedure to do this? And is it any way to change the default charset to UFT-8 so tables by default will become UFT-8? And can I have one table with different fields with different charset? Best regards, Peter Lauri