-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Stormblade wrote:
> On Wed, 21 Apr 2004 10:35:16 -0500, Mark Matthews wrote: > > >>Stormblade, >> >>If you're using UTF-8 data and JDBC, and you _haven't_ set the _server_ >>charset to UTF-8, you'll need to add 'characterEncoding=UTF-8' as a >>property to your JDBC connection string. > > > I have set the default charset to utf8. When I view my variables they all > show that utf8 as their value. My URL is as follows: What does the JDBC connection _itself_ show? Execute the following query on a java.sql.Statement, and tell us what comes back, as the values you have posted earlier (from a connection from the 'mysql' command-line client) are irrelevent in this situation: "SHOW VARIABLES LIKE 'character%'" > > jdbc:mysql://localhost/mydb?useUnicode=true&characterEncoding=UTF8 > > I tried setting useUnicode to false but it didn't have any effect. I also > tried just putting in the & rather than & but that also didn't have any > effect. I also tried saying UTF-8 as opposed to UTF8 but still nothing. > > >>You'll also probably want to use the latest nightly snapshot of either >>Connector/J 3.0 or 3.1 as they have code to support the behavior of >>Unicode charsets in MySQL-4.1.2. See >>http://downloads.mysql.com/snapshots.php for more information. > > > I did try the latest 3.1. It still behaved in the same manner and what was > worse, it broke another page of mine. I started getting an error when I > tried to display that page. It said: > > Unknown type '0 in column 9 of 16 in binary-encoded result set. Hmmm....That was fixed in the _server_ after 4.1.1 was released, so if you're not using a compile from source that was pulled from our archives, then you will have to wait until 4.1.2 comes out. > > I did a google on this and found others having that problem and it was > driver related. > > http://article.gmane.org/gmane.comp.db.mysql.java/3347 You missed the rest of the thread, then, it is actually _server_ related, and was fixed for MySQL-4.1.2 (not yet released, but available as source code): http://article.gmane.org/gmane.comp.db.mysql.java/3350 > > So since it didn't fix my issue and caused another I went back. That page > was handled differently than my others. That page used JSTL queries to get > it's result set. My other pages did it from a Java bean. Using Java I could > query and retrieve all the date from that table but the JSTL queries gave > that error. But apparently it's a bug in the driver so I have been wary of > those drivers. Did you ever look and see what encoding your JSPs are set at? If it's not UTF-8, you will see this behavior, because JSTL will use the encodings of your JSPs. It is strange (but not dismisable) that it would work from stock java bean and not a JSTL tag and that this would be caused by a _driver_ bug. > > I can try the nightly snapshots but this is bad because this project will > need to be production ready and if it needs to use trial stuff like this... MySQL-4.1 is an ALPHA. The JDBC driver is an ALPHA, and you are using features that are only in the ALPHA. For this reason you are going to have to put up with using nightly snapshots and/or doing your own builds if you want the latest bug fixes. > I'm gonna try all this week to get this working but I can't really afford > to spend more time than that. My client got busy so I got some breathing > room. I already know that using SQLServer and their JDBC driver works just > fine. But the whole purpose of the project was to convert everything to a > lower cost alternative. The app has already been converted from ColdFusion > to JSP and I also wanted to go from SQLServer to MySQL since most of the > hosting I've seen offer MySQL with the most basic service and SQLServer > only with their higher more expensive plans. I understand your frustation, however your comparison to SQL Server's JDBC driver which is GA to an ALPHA version of MySQL and its state of issues is not an apples-to-apples comparison. As far as I know, the issues you are having with our software are all fixed, and are available in nightly snapshots, but not a release. Regards, -Mark - -- Mr. Mark Matthews MySQL AB, Software Development Manager, J2EE and Windows Platforms Office: +1 708 332 0507 www.mysql.com Meet the MySQL Team! April 14-16, 2004 http://www.mysql.com/uc2004/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFAhsaEtvXNTca6JD8RAnM9AKCouV0dzDUoxj9ZBaeJc2xkTzBGCwCgvqC5 M+kjrvPBKdVxArVCJKIj4RY= =iXL6 -----END PGP SIGNATURE----- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]