http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9579
Tomás Cohen Arazi <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24425|0 |1 is obsolete| | Attachment #24426|0 |1 is obsolete| | --- Comment #20 from Tomás Cohen Arazi <[email protected]> --- Created attachment 24430 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24430&action=edit Bug 9579: Facets truncation broken for multi-byte characters We seem to be relying on whatever Zoom::Results->render return, and Perl doesn't explicitly consider it UNICODE data. That's why CORE::substr (and probably CORE::length too) cut the bytes wrong. This patch just decodes the UTF-8 data that render() returns and then Perl behaves, heh. It uses Encode::decode_utf8 which is already a dependency for the current stable Koha releases. To test: - Set FacetLabelTruncationLength = 4 to make sure it will try to truncate the facet label. - Add a record with multiple multibyte characters in the author name (copy and paste a cyrillic character several times so it is looong). Note: make sure there are at least two records so you're presented the search results. - Reindex zebra to make it possible to search the record. - Search for the record. - Notice the facet with cyrillic characters is broken in the place it gets truncated. - Apply the patch and repeat the search. - Notice the string is not broken. - Sign off. Regards To+ Sponsored-by: Universidad Nacional de Cordoba -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
