vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| if i have database named TESTDB and i'm storing utf8 data into this latin1 TESTDB database is there a way that i can convert database to utf8? what happens with utf8 data when it is stored into latin1 database? is there any way i can get original data? server/database info: mysql> use TESTDB; Database changed mysql> show variables like "character_set_database"; +------------------------+--------+ | Variable_name | Value | +------------------------+--------+ | character_set_database | latin1 | +------------------------+--------+ 1 row in set (0.00 sec) mysql> show variables like "collation_database"; +--------------------+-------------------+ | Variable_name | Value | +--------------------+-------------------+ | collation_database | latin1_swedish_ci | +--------------------+-------------------+ 1 row in set (0.00 sec) mysql> show create database TESTDB; +-------------- +------------------------------------------------------------------------- + | Database | Create Database | +-------------- +------------------------------------------------------------------------- + | TESTDB | CREATE DATABASE `TESTDB` /*!40100 DEFAULT CHARACTER SET latin1 */ | +-------------- +------------------------------------------------------------------------- + 1 row in set (0.00 sec) Server version: 5.0.22 Protocol version: 10 Connection: Localhost via UNIX socket Server characterset: latin1 Db characterset: latin1 Client characterset: latin1 Conn. characterset: latin1 |
| ||||
| On Thu, 13 Mar 2008 17:29:45 +0100, Aljosa Mohorovic <aljosa.mohorovic@gmail.com> wrote: > if i have database named TESTDB and i'm storing utf8 data into this > latin1 TESTDB database is there a way that i can convert database to > utf8? Just make the field in the table utf8, nothing else really matters. (Except connections should be told they work in utf8 ofcourse). > what happens with utf8 data when it is stored into latin1 database? No idea, I'd assume they're maimed. > Client characterset: latin1 > Conn. characterset: latin1 ...should be utf8 if you want to work with it. -- Rik Wasmus |