9 messages in com.mysql.lists.javawhat to do about character encoding -...
FromSent OnAttachments
Adam Hardy04 Dec 2003 09:41 
Adam Hardy04 Dec 2003 11:43 
Mark Matthews04 Dec 2003 13:38 
Adam Hardy04 Dec 2003 13:57 
Mark Matthews04 Dec 2003 14:22 
Adam Hardy04 Dec 2003 15:17 
Adam Hardy04 Dec 2003 16:58 
Adam Hardy04 Dec 2003 17:46 
Adam Hardy04 Dec 2003 17:57 
Subject:what to do about character encoding - new issue in 4.1.1
From:Adam Hardy (adam@cyberspaceroad.org)
Date:12/04/2003 09:41:28 AM
List:com.mysql.lists.java

I have got an error "Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='" after upgrading to 4.1.1

I think this has arisen through a bug in the tomcat container-managed security - it is not setting the character-encoding for the login page.

For all other pages in my web-app I set the character-encoding of the http request right at the start of processing to UTF-8 but for the container-managed security I can't do this - I have no access to the request object.

I think that by default, tomcat reads the request as iso-8859-1 and that this is causing the clash in mysql, since my database is all UTF-8.

Is there a java method I can use on the string to set the encoding before I send it to mysql?

Thanks Adam