MySQL UTF8 character encoding issues

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

MySQL UTF8 character encoding issues

Luke McCollum
Cross-posting from the quartz users forum, sorry if this is frowned upon:

I'm using Quartz with JBoss and MySql. Here's my problem - our
application database uses utf8 encoding, but the mysql scripts
provided with the quartz distribution apparently assume latin1
encoding, because I get this error when I run them:

ERROR 1071 (42000) at line 22: Specified key was too long; max key
length is 1000 bytes

I have a few solutions - one is to give quartz its own separate
database with latin1 encoding and respective datasource in JBoss. This
means that I will have to make the quartz and the application database
XA datasources because we will be using quartz to schedule jobs
dynamically inside of EJBs. Not a huge deal, but I'd prefer to keep
things simple.

Another solution is to create all of the tables for quartz in the same
application database but specify latin1 encoding. This seems like a
Very Bad Thing(tm) because in the connection properties for the
datasource, we specifically set it to use utf8, and I have no idea
what ramifications this has for quartz.

The last solution would be to try to munge with the provided quartz
schema to make it compatible with utf8, but from what I'm able to tell
from searching, this is going to be an exercise in frustration because
of the way quartz uses varchar names for keys.

Does anyone else have experience with this problem, or perhaps a
better solution I haven't thought of?

To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]