Hi Sean, I just tried changing the charset type on an existing table, and creating a new table with UTF8 columns (utf8/utf8_general_ci) and the schema shows the expected data
"COLUMN_TYPE","CHARACTER_MAXIMUM_LENGTH","CHARACTER_OCTET_LENGTH" "varchar(10)",10,30 "varchar(45)",45,135 There is a bug on the MySQL site that describes exactly the problem you are reporting. http://bugs.mysql.com/bug.php?id=19236 The notes say this was fixed in 5.0.22, although I'm not seeing the bug on 5.0.15 so it may be OS specific. The ObjectDAO for mysql is correct to use CHARACTER_MAXIMUM_LENGTH, as CHARACTER_OCTET_LENGTH is actually the space used to store the multibyte characters on disk. Cheers, Chris > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of Sean Corfield > Sent: 08 August 2006 07:35 > To: [email protected] > Subject: [Reactor for CF] maxlength and UTF8 (MySQL 5) > > I just noticed that with MySQL 5, Reactor uses > CHARACTER_MAXIMUM_LENGTH for varchar columns which gives somewhat > unexpected results for UTF8 data. > > e.g., varchar(32) -> maxlength 10; varchar(40) -> maxlength 13 > > The CHARACTER_OCTET_LENGTH column in the information_schema has the > value I'd expect but I'm not familiar enough with MySQL to know > whether I should simply be specifying column sizes that are bigger or > whether Reactor should use the octet length instead? > -- > Sean A Corfield -- (904) 302-SEAN > An Architect's View -- http://corfield.org/ > > "If you're not annoying somebody, you're not really alive." > -- Margaret Atwood > > > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > -- -- > Reactor for ColdFusion Mailing List > [email protected] > Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > -- -- > > > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Reactor for ColdFusion Mailing List [email protected] Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
