[Koha-bugs] [Bug 8798] Add the use of DBIx::Class

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jun 26 21:01:28 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8798

--- Comment #84 from Paul Poulain <paul.poulain at biblibre.com> ---
Created attachment 19251
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19251&action=edit
Testing DBIx::Class, continued

I tried to replace the GetBranchesLoop() call in C4/Auth.pm
In my database, there is a branchname with a diacritic. Unfortunately, it's not
properly handled:
"Institut Protestant de Th�ologie" appears instead of "Institut Protestant de
Théologie"

If I force the page encoding to latin1, it appears correctly.
Investigating DBIx::Class documentation, I find a Using Unicode chapter in
DBIx::Class::Manual::Cookbook
which says:
       MySQL supports unicode, and will correctly flag utf8 data from the
database if the "mysql_enable_utf8" is set in the
       connect options.

         my $schema = My::Schema->connection('dbi:mysql:dbname=test',
                                             $user, $pass,
                                             { mysql_enable_utf8 => 1} );

       When set, a data retrieved from a textual column type (char, varchar,
etc) will have the UTF-8 flag turned on if
       necessary. This enables character semantics on that string. You will
also need to ensure that your database / table /
       column is configured to use UTF8. See Chapter 10 of the mysql manual for
details.

       See DBD::mysql for further details.

This patch also adds the
+                mysql_enable_utf8 => 1,    # REQUIRED to handle properly utf8

line, but unfortunately, it does not fix the problem. ideas welcomed...

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list