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.

You either need to escape that null (which isn't really the right thing...this isn't a BLOB) or explicitly convert it to UTF-8. UTF-8 is an encoding explicitly made to work around this limitation of C, which is why MySQL likes it.

And since you want to accept a wider character support, you should set the web server and database to also use UTF-8. It's the right way to handle such characters. ISO 8859 is a backwards compatibility hack to allow ancient technologies to support one of several subsets of the world's characters. What you really want is to support them all, transparently. That's Unicode.

See http://www.fileformat.info/info/unicode/char/00a3/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to