[Koha-bugs] [Bug 9579] Incorrect display of UNICODE symbols in 'Refine Search Results'
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Jan 15 20:58:48 CET 2014
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9579
Tomás Cohen Arazi <tomascohen at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #15202|0 |1
is obsolete| |
Attachment #15259|0 |1
is obsolete| |
Attachment #16942|0 |1
is obsolete| |
--- Comment #18 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 24425
-->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24425&action=edit
Bug 9579: use String::Multibyte to correctly truncate facets
Bug 9579: use String::Multibyte to correctly truncate facets
As Bernardo pointed on comment #17, the incorrect display of
multibyte strings in facets is related to the way they are
currently truncated.
C4::Search::getRecords relies on CORE::substr for the task,
which only counts bytes, and thus doesn't check it is breaking
multi-byte characters.
This patch replaces both the use of
CORE::substr
and CORE::length
for their String::Multibyte counterpart.
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 'ակ' 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+
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list