[Moved to dbi-dev]

On Wed, Sep 10, 2003 at 03:46:20PM +0100, Steve Hay wrote:
> Tim Bunce wrote:
> >On Wed, Sep 10, 2003 at 11:42:23AM +0100, Steve Hay wrote:
> >>Bart Lateur wrote:
> >>
> >>>On Wed, 10 Sep 2003 10:40:29 +0100, Steve Hay wrote:
> >>>
> >>>>But the question was: How can I arrange for such conversions to be 
> >>>>performed automatically by DBI whenever it receives or returns data?
>
> >Basically it should be the job of the drivers to set the uft8 flag on
> >data being retrieved if it is utf8. I believe that the new mysql v4.1
> >protocol does provide information about the characterset of each colum.
> >DBD::mysql can use that.
>
> Ah.  In that case, I should get onto the DBD-mysql people to look for 
> assistance.  I was thinking that DBI itself would be adding some kind of 
> UTF-8 support.

It'll get something to help express what's needed, but the drivers
are the ones that ought to set the flag.

> >For people stuck with older versions of mysql, a driver private
> >option could be used to indicate that all char fields are utf8,
> >or have some way of indicating that per-column, such as
> >
> >     $sth->bind_col(1, undef, { mysql_charset => 'utf8' });
>
> OK, I'll pass this suggestion on to the DBD-mysql maintainer(s).

Actually, something like    ..., { mysql_is_utf8 => 1 });
would be simpler

Tim.

Reply via email to