Thanks, Warren and Phil for your responses. And Martijn. Yesterday I went through all my code and tomcat/web application configuration settings, and converted all to UTF-8. I converted the database to UTF-8. According to all the books and articles I've read, I have set every setting to use UTF-8. Still the inserts and updates were breaking. Gerald Clark suggested I turn query logging on, and I did.
This showed that the query, in mysql, was truncated when it contained a £ sign, and perfectly fine when it didn't. It was perfect when I handed it to the MySQL JDBC connector, but broken when it got to mysql. Anything without a £ sign was fine on both sides. And if I gave the query to mysql via the command line interface, or via perl, it was fine. It didn't seem to be in my app, nor in mysql itself. It seemed to be the connector! So I looked and was surprised to find I was using mysql-connector-java-3.13-beta-bin.jar. I just upgraded to mysql-connector-java-5.0.3-bin.jar and that has fixed the problem! Why was I using a beta version? I do not know. Thanks, everyone, for your help! I hope the next person who runs into this problem benefits from this thread. Regards, Paul ----- Original Message ---- From: Philip Mather <[EMAIL PROTECTED]> To: MySQL List <mysql@lists.mysql.com> Sent: Friday, October 20, 2006 2:24:18 PM Subject: Re:£ (Great Britain Pound) breaks MySQL insert and update - disastrous overwrite Warren Young wrote: > Paul Warner wrote: >> >> When a user enters text with a £ sign (Great Britain Pound) in the >> browser and clicks enter, any insert or update statement apparently >> gets truncated in mysql. > > It's possible that somewhere along the line, the character is getting > translated to a multibyte Unicode format. (UTF-16 or -32, most > likely.) The hex value for the pound sign is 00A3, which includes a > null character, which the MySQL C API will interpret as end-of-string. From my own experience I'd point out that if your using a terminal to do something like SSH, that too needs to be set to the correct encoding as well. Data being imported (be that any method, even cutting and pasting) can also be an area of strife, I suffered greatly when when producing a copious country and region listing system with everything in the correct character sets for a website that had up until then been ISO-{whatever}. Regards, Phil -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]