------=_NextPart_000_0007_01C35100.3C359420
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
I have a problem with the way mysql seems to manage the
length of characters-columns with multi-byte encodings.
I'm using the 4.1.0 version of MySQL.
For example, if i define a column of type varchar(10) and
of encoding utf8, i can put in the column 10 one-byte characters,
but only 5 2-bytes characters. Mysql seems to count the number
of bytes of the representation, not the number of characters.
The problem can be reproduced with the following lines :
create table table1(col1 varchar(10) character set latin1, col2 =
varchar(10)
character set utf8, col3 varchar(10) character set ucs2);
insert into table1 values("abcdefghij", "abcdefghij", "abcdefghij");
insert into table1 values("=E9=E9=E9=E9=E9=E9=E9=E9=E9=E9", =
"=E9=E9=E9=E9=E9=E9=E9=E9=E9=E9", "=E9=E9=E9=E9=E9=E9=E9=E9=E9=E9");
select * from table1;
+------------+------------+-------+
| col1 | col2 | col3 |
+------------+------------+-------+
| abcdefghij | abcdefghij | abcde |
| =E9=E9=E9=E9=E9=E9=E9=E9=E9=E9 | =E9=E9=E9=E9=E9 | =
=E9=E9=E9=E9=E9 |
+------------+------------+-------+
I search the MySQL manual and the web for information about this,
but found no information. I also found nothing in the bugs reports
of MySQL.
Does someone have information about this ?
This clearly seems as a bug for me, but is it condidered as a bug by
MySQL and will this be fixed soon ? Or will we have to manage with this
for a while ?
Thank you in advance for a response,
Bertrand Lanneau.
------=_NextPart_000_0007_01C35100.3C359420--
