Bug 13709 - Patron cards creator doesn't work with diacritics, utf-8 or ttf fonts
Summary: Patron cards creator doesn't work with diacritics, utf-8 or ttf fonts
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Dobrica Pavlinusic
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-13 14:36 UTC by Dobrica Pavlinusic
Modified: 2017-06-14 22:05 UTC (History)
6 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 13709 - Patron cards creator utf-8 encoding and ttf fonts broken (1.98 KB, patch)
2015-02-13 14:42 UTC, Dobrica Pavlinusic
Details | Diff | Splinter Review
Bug 13709 - Patron cards creator utf-8 encoding and ttf fonts broken (2.04 KB, patch)
2015-03-02 08:38 UTC, Brendan Gallagher
Details | Diff | Splinter Review
Bug 13709 - Patron cards creator utf-8 encoding and ttf fonts broken (2.10 KB, patch)
2015-03-05 11:00 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Dobrica Pavlinusic 2015-02-13 14:36:08 UTC
Bug 8375 introduced ttf fonts for labels printing to support diacritics and utf-8 encoding, but this change was never implemented for patron cards.
Comment 1 Dobrica Pavlinusic 2015-02-13 14:42:17 UTC Comment hidden (obsolete)
Comment 2 Brendan Gallagher 2015-03-02 08:38:45 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2015-03-05 11:00:56 UTC
Created attachment 36558 [details] [review]
Bug 13709 - Patron cards creator utf-8 encoding and ttf fonts broken

This change is similar to Bug 8375 which introduced ttf fonts for
labels printing in order to support diacritics and utf-8 encoding,
but this change was never implemented for patron cards.

Test scenario:

1. make sure that you have <ttf> font mapping in koha-conf.xml
2. define partron card layout, template, profile and batch
   (with utf-8 chars, probably in patron firstname or surname)
3. verify that without this patch pdf export file is error message
   Wide character in compress at /usr/share/perl5/PDF/Reuse.pm line 820
4. apply this patch and verify that generated pdf has correct encoding

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 4 Tomás Cohen Arazi 2015-03-19 18:05:25 UTC
Patch pushed to master.

Thanks Dobrica!
Comment 5 Chris Cormack 2015-03-22 05:26:36 UTC
Pushed to 3.18.x will be in 3.18.5
Comment 6 M. Tompsett 2015-11-25 19:54:26 UTC
FOR FURTHER REFERENCE:
"Wide character in compress at /usr/share/perl5/PDF/Reuse.pm line 820"
is also triggered if the font, mentioned in the ttf section in the koha-conf.xml file, is NOT INSTALLED.
Comment 7 Heinrich Hartl 2016-02-09 12:07:26 UTC
With koha 3.22 I had the problem that exporting a batch with one surname (Jovanić) containing an accented character just ended without error message or result. Changing that name (to Jovanic) resulted in normal result being produced.
SO I guess this patch is either incomplete or another subtle detail still needs attention.