Re: DBD::mysql and utf-8 problem
Patrick Galbraith <[email protected]> Fri, 27 Jun 2008 09:43:21 -0400
| Newsgroups | gmane.comp.db.mysql.perl |
|---|---|
| Message-ID | <[email protected]> |
Helmut, If I were to try a small change in the driver code as you indicated, could you test that change for me to see if it works for you? We use UTF-8 all the time where I work at Grazr and have encountered no problems. I'd also be interested to see what other perl drivers produce in terms of results for other databases. I may have a PostgreSQL server on one of my boxes. If it's the driver that has an issue, I'd like to fix it. I'll be glad to receive any help from you or others in testing this too ;) Kind regards, Patrick Helmut wrote: > Hi Rob, > > > i testet this and got no change. > > Of course i testet a "real" query from a real table also; with the > same results. > > I have the "feeling" with the Server + Database everything is fine > (mysql command line output on a utf8 console is ok, > mysqldump works ok, > didn't yet check a jbdc driver..), > but it is really a driver issue.. > > Thank You > > Helmut > > > Rob Mueller schrieb: >>> my $text = $dbh->selectrow_array (qq (select ?), undef, $aeu); >>> >>> Why does Perl not calculate the correct number of characters? >>> Does one (still) have to decode every string value received from the >>> DBD::mysql driver? >> >> I haven't tested this, but maybe there's some confusion over the >> charset type of the data. The documentation talks about the actual >> data having to be utf8 data (eg a latin1 column will come back as >> octet data, not a perl utf8 string). Maybe try this: >> >> my ($text) = $dbh->selectrow_array (qq (select convert(? using >> utf8)), undef, $aeu); >> >> Rob >> > > -- Patrick Galbraith, Senior Programmer Grazr - Easy feed grazing and sharing http://www.grazr.com Satyam Eva Jayate - Truth Alone Triumphs Mundaka Upanishad -- MySQL Perl Mailing List For list archives: http://lists.mysql.com/perl To unsubscribe: http://lists.mysql.com/[email protected]