Neid has asked for the wisdom of the Perl Monks concerning the following question:
Hi
I have some kind of deamon which keeps persistent connection
with database.
I'm using this kind of pseudo code:
$dbh = connect
# to save/receive utf8 data
$dbh->do( "SET NAMES 'utf8'" );
# enable auto reconnect
$dbh->{mysql_auto_reconnect} = 1;
I have noticed that after some time when driver performs
autoreconnection it starts using latin1 connection!
Is there a way to setup some kind of hook when driver reconnects to send "SET NAMES 'utf8'" query?
Or can you point me a different solution?
Thanks
Neid
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: mysql_auto_reconnect and utf8
by hipowls (Curate) on Jan 25, 2008 at 22:10 UTC | |
by Neid (Scribe) on Jan 26, 2008 at 00:51 UTC | |
by Joost (Canon) on Jan 27, 2008 at 22:38 UTC | |
|
Re: mysql_auto_reconnect and utf8
by Joost (Canon) on Jan 25, 2008 at 22:15 UTC |