Hi, Our production system koha is utf8 on a windows platform. I do not know whether its different in Unix but here is the solution we found. Any read-writes to mysql is through biblio.pm so we saved the biblio.pm as an utf8 file. (Windows gives you the opportunity of saving a text file in ANSI(iso8859), utf8 or unicode(16bit).) This sorted out 2 problems: 1-Reading,writing from db and display is allways utf8 2- Char_decode subroutine works correctly when importing MARC into Koha I believe what this does is something similar to Pauls smiley solution simply and effectively. With this we did not even need binmode(STDOUT, ":utf8") either which is very cleverly debugged by Paul. Hope it helps, Tumer Garip
Paul wrote: Hello,
(I cc: mike Rylander in case the pines guys have another solution...)
I continue investigating the utf8 stuff. I have a very very bad feeling : it seems that Perl DBI::mysql does not handle >utf8 correctly. Here are some links : http://www.cpanforum.com/threads/654 http://lists.mysql.com/perl/3714 http://marc.theaimsgroup.com/?l=msql-mysql-modules&m=111970179409036&w= 2 http://lists.mysql.com/perl/3006?f=plain
If I read correctly, there are only 2 ways to solve this : * bug DBD::mysql maintainer to have the fix included. Would require an official release, an upgrade of DBD::mysql, but >it's a better solution in the long term. * modify EVERY SQL query to Encode::decode_utf8() every value. A quite huge task !
I have modified one script (marc_subfield_structure.pl), and everything works fine with Encode::decode_utf8 (and don't >>work without it) -- Paul POULAIN et Henri Damien LAURENT Consultants indépendants en logiciels libres et bibliothéconomie (http://www.koha-fr.org)