Re: [CDBI] [Repost] Set utf8 character set on class connection?

[prev] [thread] [next] [Date index for 2006/01/09]

From: Perrin Harkins
Subject: Re: [CDBI] [Repost] Set utf8 character set on class connection?
Date: 20:38 on 09 Jan 2006
On Mon, 2006-01-09 at 21:24 +0100, Birgit Kellner wrote:
> use Class::DBI;
> package ILKB::DBI;
> use base 'Class::DBI';
> ILKB::DBI->connection("dbi:mysql:$db",'$usr','$pwd');
> ILKB::DBI->db_Main->do("set names utf8");

The danger here is that if you lose your connection, it will reconnect,
and will not re-run that SQL.  You have to override db_Main to fix that.
If you only use this in short command-line scripts and not in a
persistent environment like mod_perl, you may be okay.

- Perrin


_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

(message missing)

Re: [CDBI] [Repost] Set utf8 character set on class connection?
Perrin Harkins 20:38 on 09 Jan 2006

Generated at 01:21 on 10 Jan 2006 by mariachi v0.52