On Sun, 08 Aug 2004 12:33:22 -0700, Tim Bunce wrote:

I'm thinking in terms of something like $sth->{SetUTF8}->[$index] = $mode

        0:     Force SvUTF8_off regardless
        undef: Do nothing (leave it up to the driver)
        1:     (value is well-formed utf8) ? SvUTF8_on : SvUTF8_off
        2:     Force SvUTF8_on regardless

(with a way to set it via bind_col as well)

And perhaps a $dbh->{SetUTF8} = $mode; to provide a default.

Umm, it's just dawned on me that the persistance of the utf8 flag
across sv_set functions means I could implement all but "1" in DBI v1.
(Option "1" requires looking at the value that's just been set and
that not simple/efficient for DBI v1.)

Hey, I just ran into a situation where I could really use this.

  http://bugs.bricolage.cc/show_bug.cgi?id=709#c14

Tim, do you think this might make it into the next release of DBI v1? I'd especially like to do

  $dbh->{SetUTF8} = 2;

And be done with it.

Cheers,

David

PS: I assume that if I do:

  my $data = $utf8_data;

where $utf8_data has SvUTF8_on that $data will also have SvUTF8_on. Is that correct?



Reply via email to