Bug #18904 utf8 / unicode support
Submitted: 8 Apr 2006 12:37 Modified: 15 Mar 2007 17:30
Reporter: Ask Hansen (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:Connectors: DBD::mysql ( Perl ) Severity:S4 (Feature request)
Version: OS:
Assigned to: CPU Architecture:Any

[8 Apr 2006 12:37] Ask Hansen
Description:
When data from MySQL is utf8, DBD::mysql should tell Perl that so it can be treated properly.

How to repeat:
Add unicode data to MySQL.  Fetch it with DBD::mysql.  Notice how Perl doesn't know it's utf8.

Suggested fix:
I'm not sure if they are proper, but a few suggested patches have been coming by the on the mailing list.
[10 Apr 2006 13:04] Valeriy Kravchuk
Thank you for a problem report. Please, specify the exact version of DBD::mysql, Perl and MySQL server used. Simple self-contained test case will be also useful.
[10 Apr 2006 18:58] Ask Hansen
DBD::mysql 3.0002, Perl 5.8.7, MySQL 5.0.19.

I don't have time to make up an example demonstrating the flaw this week, but you can see for example this discussion thread:
  http://lists.mysql.com/perl/3774

Or this one from 2003:
   http://lists.mysql.org/perl/2351

Or another related post:
    http://www.simplicidade.org/notes/archives/2005/12/utf8_and_dbdmys.html
[21 May 2006 15:59] Valeriy Kravchuk
It is a known bug, already reported at cpan.org (see http://rt.cpan.org/Public/Bug/Display.html?id=17829, e.g.). Not fixed yet.
[2 Feb 2007 11:08] Sveta Smirnova
Bug #26010 was marked as duplicate of this one
[2 Feb 2007 11:18] Sven Neuhaus
First off, this bug's severity is wrong: It's no longer a feature request as it has been implemented.

However, the feature has the following bug:

When fetching data from a column with collation "utf8_bin", the utf8-flag does not get set (I checked with utf8::is_utf8() ).

When fetching data from columns with collation "utf8_general_ci" or "utf8_unicode_ci" the flag is set correctly. See also bug #26010

I am using DBD::mysql 4.001 with DBI 1.53 and perl 5.8.4.
[15 Mar 2007 17:30] Jim Winstead
This was implemented. Sven's bug is still open on rt.cpan.org.