List:General Discussion« Previous MessageNext Message »
From:Nico Sabbi Date:April 4 2007 9:51am
Subject:converting TEXT fields between charsets doesn't work
View as plain text  
I followed the instructions to change columns values from an encoding 
(in my case from latin1 to utf8), but the operation simply failed.

The manual reads  :
If you want to change the table default character set and all character 
columns (|CHAR|, |VARCHAR|, |TEXT|) to a new character set, use a 
statement like this:

ALTER TABLE /|tbl_name|/ CONVERT TO CHARACTER SET /|charset_name|/;

*Warning:* The preceding operation converts column values between the 
character sets.

fact is that the columns values are completely unaffected.
If in konsole with encoding set to latin1 I select one particular TEXT 
field from the table
before the conversion I can see correct accented letters; after the 
to utf8 (but with the konsole encoding still set to latin1) the select 
of the same field
still shows correct accented letters, that would have been impossible if 
the encoding conversion
had actually been done.

Changing the table handler from Innodb to Myisam didn't help.
The version of Mysql I'm using is 5.0.27-max.

Am I doing something wrong?

 --, the professional e-mail, gratis per te:
 Refill s.r.l. - Il risparmio è fai da te! Inchiostri, cartucce, toner, carta
speciale: ogni ricarica per la tua stampante ti costa solo 1 EURO!
 Clicca qui:
converting TEXT fields between charsets doesn't workNico Sabbi4 Apr