[CDBI] Set utf8 character set on class connection?

[prev] [thread] [next] [Date index for 2005/11/20]

From: Birgit Kellner
Subject: [CDBI] Set utf8 character set on class connection?
Date: 09:51 on 20 Nov 2005
Hi,

I've just started learning Class::DBI, and trying to find out how I can 
adapt an existing script to it.

The database uses utf8 encoding in MySQL 4.1.
With DBI, for some reason I have to execute "set names utf8" after 
setting up the database connection.
I have set all MySQL character variables to "utf8", but DBI doesn't seem 
to read them.

Rewriting the script for Class::DBI, I've now defined this class 
connection:
ILKB::DBI->connection("dbi:mysql:ilkb_test",'$usr','$pwd');

But how do I set the character set on this connection?
I was thinking of using "set_sql", but don't know the correct syntax.

Thanks in advance,

best regards,

Birgit Kellner

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

[CDBI] Set utf8 character set on class connection?
Birgit Kellner 09:51 on 20 Nov 2005

Generated at 21:49 on 21 Nov 2005 by mariachi v0.52