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