Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MaxDB - Everything about MaxDB, formerly known as SAP DB
MySQL++ - Programming with the C++ API to MySQL
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
ODBC - ODBC with the MySQL Connector/ODBC driver
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
mysql openssl Question
mysql:it 's a db not a dbms how it 's possible?!
Does the binary log enabling affect the MySQL performances?
Strange behavior, Table Level Permission
FULLTEXT query format question
Preventing Duplicate Entries
Comparing and writing out BLOBS
Executing MySQL Commands From Within C Program
Can 't access mysql after kernel upgrade
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Downgrade Mysql from 4 to 3 23
MySQL Cluster Software
mysql test 4 1 fails with the gis test
ERROR 2002: Can 't connect to local MySQL server through socket
Getting Identity after INSERT
Update one field with more fields from another table
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
mysql have same function mthod as Oracle decode()
 
Data truncated during character set conversion

Data truncated during character set conversion

2006-07-03       - By Timur Izhbulatov

 Back
Reply:     1     2     3  

Hi all,

I'm following the instructions [1] to convert character set. Unfortunately I get
warnings about truncated data for some rows in several columns. All the
truncated columns are text type.

Assuming the `col' column is text type and actually contains correct utf8 data
but has wrong character set I use the following queries to fix it:

ALTER TABLE table MODIFY col BLOB;
ALTER TABLE table MODIFY col TEXT CHARACTER SET utf8;

After the second query I get warnings about truncated data for some rows and I
can actually see the rows truncated. I played a bit with different data types
(LONGBLOB/LONGTEXT) but wasn't successful.

So my question is what can be the cause of the data loss and how to avoid it?

Thanks in advance.

[1] http://dev.mysql.com/doc/refman/4.1/en/charset-conversion.html

Cheers,

--
Timur Izhbulatov
OILspace, 26 Leninskaya sloboda, bld. 2, 2nd floor, 115280 Moscow, Russia
P:+7 495 105 7245 + ext.205 F:+7 495 105 7246 E:TimurIzhbulatov@(protected)
Building Successful Supply Chains - One Solution At A Time.
www.oilspace.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=mysql@(protected)