8 messages in com.mysql.lists.perlRe: Problem with quote and multi-byte...
FromSent OnAttachments
Todd Finney09 Dec 1999 07:10 
Autarch09 Dec 1999 08:34 
Autarch09 Dec 1999 08:36 
Jochen Wiedmann09 Dec 1999 12:00 
Jochen Wiedmann09 Dec 1999 12:05 
Jochen Wiedmann09 Dec 1999 12:29 
Jochen Wiedmann09 Dec 1999 12:29 
Michael Widenius14 Jan 2000 07:23 
Subject:Re: Problem with quote and multi-byte character sets
From:Jochen Wiedmann (jo@ispsoft.de)
Date:12/09/1999 12:29:35 PM
List:com.mysql.lists.perl

Autarch wrote:

I'd patch dbdimp.c (or try, with my crappy C skills) but I cannot for the life of me figure out how the heck I can get mysql to tell me what character set it was compiled with! If I could do that, I'd add a check for the charset somewhere and store it. I'm thinking that if there's some of global structure (the driver handle maybe?) that exists then it should go there. Then during the quote function I'd check this and check the position in the string when deciding whether to escape a backslash.

If I get you right, your patch would definitely not work in a traditional environment, so it will never be the default.

However, I see no reason against adding such a patch on behalf of the user. For example, one could use it like this:

$dbh = DBI->connect("DBI:mysql:mysql_unicode_quote=1")

If you can send me a working patch, I'll be happy to add the optional use.

Bye,

Jochen