Re: Message from Maintainer to DBD::mysql users, developers





On Wed, 29 Mar 2006, Tim Bunce wrote:

On Wed, Mar 29, 2006 at 10:53:56AM +0200, Peter J. Holzer wrote:
On 2006-01-31 01:24:18 +0100, Patrick Galbraith wrote:
I apologise for what might seem somewhat of a bit of neglect on my part to get
some features into DBD::mysql, features such as UTF support, some bugs in
3.0002_4. I've been super busy on some other projects, but have finished one of
them and have today started to go through my mail in order to start addressing
some needs of DBD::mysql.

I'm wondering if it might help to discuss within this list what priorities
users would like to see addressed in DBD::mysql, so I could come out with some
sort of road map.

Sorry for the late reply, but I just stumbled across it again recently:

Since mysql supports different charsets per table and even per column,
I'd like an option to automatically convert them to and from perl's
internal UTF-8 encoding.

(Actually, I'd like that to be the default behaviour, but it probably
would break a lot of existing scripts, so it should be an option at
first)

I think that translates into just asking DBD::mysql to set the
'connection charset' to utf8 and then mysql server will look after the
conversions for you.

Hmmm, I tried setting the default connection charset:

/etc/my.cnf:
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
default-character-set=utf8

mysql> show variables like 'character_set_connection';
+--------------------------+-------+
| Variable_name | Value |
+--------------------------+-------+
| character_set_connection | utf8 |
+--------------------------+-------+
1 row in set (0.00 sec)

But the scalars selected from a utf8 field still do not have the
utf8 flag set in perl.

Various abstraction layer plugins like Class::DBI::utf8 and
DBIx::Class::UTF8Columns attempt to bandage this problem.

But I don't want to use heavyweight systems for lightweight
high-volume queries that I can type more easily as SQL.

Mark

.



Relevant Pages