]> git.koha-community.org Git - koha.git/commit
Bug 6554 - make Koha internally utf-8 clean
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 10 Jun 2012 14:18:42 +0000 (15:18 +0100)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Mon, 1 Apr 2013 22:51:49 +0000 (18:51 -0400)
commitd542740ab8877234d043c8a11cb19a6004e72656
tree84a63cc4318b15c217b150be3f5877841b644743
parent65ea963e5217b1e955e404ea1c09928f6b259110
Bug 6554 - make Koha internally utf-8 clean

In current implementation (mostly commented out in this patch)
uses heuristic to guess which strings need decoding from utf-8
to binary representation and doesn't support utf-8 characters
in templates and has problems with utf-8 data from database.

With this changes, Koha perl code always uses utf-8 encoding
correctly. All incomming data from database is allready
correctly marked as utf-8, and decoding of utf8 is required
only from Zebra and XSLT transfers which don't set utf-8 flag
correctly.

For output, standard perl :encoding(utf8) handler is used
so it also removes various "wide character" warnings as side-effect.

Test scenario:
1. make sure that you have utf-8 characters in your biblio
   records, patrons, categories etc.
2. try to search records on intranet and opac which contain
   utf-8 characters
3. install language which has utf-8 characters, e.g. uk-UA
   dpavlin@koha-dev:/srv/koha/misc/translator(bug_6554) $
   PERL5LIB=/srv/koha/ perl translate install uk-UA
4. switch language to uk-UA and verify that templates
   display correctly
5. test search and Z39.50 search and verify that caracters
   are correct

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
I followed the test plan, adding utf-8 characters to library names,
patron categories, titles, and authorized values. I tried the uk-UA
translation and everything looked good.

When performing Z39.50 searches for titles containing utf-8 characters I
got results which were still occasionally contaminated with dummy
characters [?] but I assume this is Z39.50's fault not the patch's.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Already signed, add mine.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
18 files changed:
C4/Context.pm
C4/ItemType.pm
C4/Output.pm
C4/Search.pm
C4/Templates.pm
admin/preferences.pl
admin/z3950servers.pl
authorities/authorities-home.pl
catalogue/search.pl
cataloguing/addbiblio.pl
cataloguing/additem.pl
cataloguing/z3950_search.pl
members/member.pl
opac/opac-search.pl
reports/guided_reports.pl
reserve/renewscript.pl
serials/routing-preview.pl
serials/routing.pl