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

Reply via email to