Re: Debian Buster -> Bullseye upgrade issue with UTF8?
Simon Cruickshank <[email protected]> Tue, 17 Aug 2021 10:41:46 +0100
| Newsgroups | gmane.comp.lang.perl.modules.dbi.general |
|---|---|
| Message-ID | <CADXRn-iv1SzhjQk4ZMoKGHLPyRMCT9CjDne_niA1qz3C0t4tVQ@mail.gmail.com> |
--000000000000797e6905c9be225f Content-Type: text/plain; charset="UTF-8" Sorry I was mistaken I actually use CGI::Application::Plugin::Session but I will look into your suggestion. Many thanks, Simon On Tue, 17 Aug 2021 at 10:14, <[email protected]> wrote: > Hi Simon > > Did you see the same issue when replacing the deprecated CGI::Session > with my module Data::Session? > > I must confess I don't expect the latter to fix this particular problem. > > --- > Cheers > Ron > savage.net.au > > > On 2021-08-17 17:41, Simon Cruickshank wrote: > > I use perl CGI::Session on a Debian buster box, after upgrading to > > Bullseye the website barfs with message :- > > > > DBD::mysql::db do failed: Incorrect string value: > > '\xF9\x08a\x00\x00\x00...' for column `webapp`.`sessions`.`a_session` > > at row 1 at /usr/share/perl5/CGI/Session > > > > I can recreate the issue without CGI:Session with the following code. > > > > #! /usr/bin/perl -w > > use strict; > > use DBI; > > > > my ($dbh, $sth, $count); > > > > $dbh = DBI->connect > > ("DBI:mysql:host=localhost;database=webapp","webadmin","?????????", > > {PrintError => 0, RaiseError => 1}); > > $sth = $dbh->prepare ("insert into sessions values (?,?)"); > > my ($id,$a_session) = ($ARGV[0],$ARGV[1]); > > $a_session = "\x{F9}"; > > $sth->execute ($id,$a_session) > > or die $DBI::errstr; > > $sth->finish (); > > $dbh->disconnect (); > > exit (0); > > > > So the issue just seems to be with UTF8? This works fine on Buster but > > not Bullseye. If I encode_utf8 the string the insert works. > > > > Is this a change in the mysql backend or a change in the DBI? > > > > Any help would be greatly appreciated. > > > > Best Regards, > > > > Simon > --000000000000797e6905c9be225f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Sorry I was mistaken I actually use CGI::Application:= :Plugin::Session but I will look into your suggestion.</div><div><br></div>= <div>Many thanks,</div><div><br></div><div>Simon<br></div></div><br><div cl= ass=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, 17 Aug 20= 21 at 10:14, <<a href=3D"mailto:[email protected]">[email protected]</a>= > wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px = 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi S= imon<br> <br> Did you see the same issue when replacing the deprecated CGI::Session <br> with my module Data::Session?<br> <br> I must confess I don't expect the latter to fix this particular problem= .<br> <br> ---<br> Cheers<br> Ron<br> <a href=3D"http://savage.net.au" rel=3D"noreferrer" target=3D"_blank">savag= e.net.au</a><br> <br> <br> On 2021-08-17 17:41, Simon Cruickshank wrote:<br> > I use perl CGI::Session on a Debian buster box, after upgrading to<br> > Bullseye the website barfs with message :-<br> > <br> > DBD::mysql::db do failed: Incorrect string value:<br> > '\xF9\x08a\x00\x00\x00...' for column `webapp`.`sessions`.`a_s= ession`<br> > at row 1 at /usr/share/perl5/CGI/Session<br> > <br> > I can recreate the issue without CGI:Session with the following code.<= br> > <br> > #! /usr/bin/perl -w<br> > use strict;<br> > use DBI;<br> > <br> > my ($dbh, $sth, $count);<br> > <br> > $dbh =3D DBI->connect<br> > ("DBI:mysql:host=3Dlocalhost;database=3Dwebapp","webadm= in","?????????",<br> > {PrintError =3D> 0, RaiseError =3D> 1});<br> > $sth =3D $dbh->prepare ("insert into sessions values (?,?)&quo= t;);<br> > my ($id,$a_session) =3D ($ARGV[0],$ARGV[1]);<br> > $a_session =3D "\x{F9}";<br> > $sth->execute ($id,$a_session)<br> > or die $DBI::errstr;<br> > $sth->finish ();<br> > $dbh->disconnect ();<br> > exit (0);<br> > <br> > So the issue just seems to be with UTF8? This works fine on Buster but= <br> > not Bullseye. If I encode_utf8 the string the insert works.<br> > <br> > Is this a change in the mysql backend or a change in the DBI?<br> > <br> > Any help would be greatly appreciated.<br> > <br> > Best Regards,<br> > <br> > Simon<br> </blockquote></div> --000000000000797e6905c9be225f--