Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CF7 and mysql 4.1 double byte help?

2 views
Skip to first unread message

DavidWebber

unread,
Feb 27, 2005, 8:52:45 AM2/27/05
to
we know CF6 supports mysql from 3.x to 4.x very well in double
bytes, but CF7 only supports mysql 3.x , and we can let it support mysql 4.x
by using the newest connecter-J ,but when I use
"useUnicode=true&characterEncoding=gb2312" to connect with mysql, that does
not work,I have tried to connect it with
"useUnicode=true&characterEncoding=UTF8", and that also just outputs
arsy-varsy code.

PaulH

unread,
Feb 27, 2005, 11:25:21 AM2/27/05
to
i think w/the new driver you have to add the char encoding to the jdbc url. see http://www.markme.com/cantrell/archives/007078.cfm for details.

DavidWebber

unread,
Feb 27, 2005, 10:44:29 PM2/27/05
to
from http://www.markme.com/cantrell/archives/007078.cfm
I spent a good portion of my day trying to get unicode to work with MySQL 4.1
and CFMX 7.0. As it turns out, it's actually pretty easy. I had the database
tables created correctly. That I learned from earlier versions of MySQL. Just
add this to the end of your CREATE TABLE command:

CHARACTER SET utf8;

I even had the connection string right in the data source form in the CFMX
administrator:

useUnicode=true&characterEncoding=UTF8

The problem is that the connection string apparently doesn't go in the
"connection string" field. Since I'm using a newer MySQL driver than the one
that shipped with CFMX 7 (that supports MySQL 4.x), I discovered that you
actually have to append the connection string to the JDBC URL, like this:

jdbc:mysql://localhost:3306/dataBaseName?useUnicode=true&characterEncoding=UTF8

Once I made the change, instant Japanese! I hope this saves someone out there
several hours of head scratching.

But how to use the exist database? we must recreate tables with "CHARACTER SET
utf8", or how to convert the exist into urf8?

PaulH

unread,
Feb 27, 2005, 10:56:08 PM2/27/05
to
not that i know much about mysql, but i guess you'd just use the database's existing char encoding on that jdbc url.
0 new messages