Re: utf8 and mysql
Gabor Szabo <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.dbi.general |
|---|---|
| Message-ID | <CABe4FJBMm-KW0VPf6=x+UQggV+YeyyvJ4M6F5M=mEGH2-Ua96w@mail.gmail.com> |
On Wed, Jul 31, 2013 at 7:39 PM, Meir Guttman <[email protected]> wrote: > Dear Gabor, > You must include «mysql_enable_utf8 => 1» hash record in the connection attributes used when you create the DBI handle > my %conn_attrs = (RaiseError => $RaiseError, > PrintError => $PrintError, > AutoCommit => $AutoCommit, > mysql_enable_utf8 => 1); > my $dbh = DBI->connect > ($dsn, $user_name, $password, \%conn_attrs); > > Meir > That worked. Great. Thank you! This was entirely unclear to me from the docs that it needs to be a separate key as I looked a couple of lines above the documentation of mysql_enable_utf8 where it showed another key, mysql_use_result, being in the actual connection string. Gabor