[Bug 9208] New: overdue letters (pdf) are not correctly encoded
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9208 Bug ID: 9208 Summary: overdue letters (pdf) are not correctly encoded Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: Notices Assignee: koha-bugs@lists.koha-community.org Reporter: sophie.meynieux@biblibre.com When pdf files are generated from html, diacritics ar not correctly encoded. This patch forces encoding to utf-8 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9208 --- Comment #1 from Sophie MEYNIEUX <sophie.meynieux@biblibre.com> --- Created attachment 13879 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13879&action=edit Bug 9208 : Add utf-8 encoding when generating pdf letters from html files. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9208 Sophie MEYNIEUX <sophie.meynieux@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=6030 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9208 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13879|0 |1 is obsolete| | --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 13935 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13935&action=edit Bug 9208 : Add utf-8 encoding when generating pdf letters from html files. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9208 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9208 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Assignee|koha-bugs@lists.koha-commun |sophie.meynieux@biblibre.co |ity.org |m QA Contact| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9208 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #3 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- QA Comment: Trivial change. Did not test it; requires specific Python library. The added encoding parameter seems to be in line with xhtml2pdf specs. Will not harm anyone :) Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9208 --- Comment #4 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Could you please provide an example of when diacritics are not coded correctly? As far as I can tell, encoding is automatically correct before the patch. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9208 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA --- Comment #5 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Marking failed QA until I have an answer about how to reproduce. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9208 Sophie MEYNIEUX <sophie.meynieux@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also|http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=6030 | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9208 --- Comment #6 from Sophie MEYNIEUX <sophie.meynieux@biblibre.com> --- Created attachment 28849 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28849&action=edit Bug 9208 : Fix encoding of overdue letters When overdue letters templates contain symbol like euro, the conversion between html to pdf results in wrong encoding of special characters. Adding explicit utf8 encoding at the beginning of html file resolves this problem. This is already done for hold notices. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9208 Sophie MEYNIEUX <sophie.meynieux@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9208 Sophie MEYNIEUX <sophie.meynieux@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13935|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9208 --- Comment #7 from Sophie MEYNIEUX <sophie.meynieux@biblibre.com> --- I replace the initial patch with this new one that is compliant with what already exists for holds notices. To test : * Write an overdue letter with some symbol like € (euro) for example) * make sure you've got one borrower with overdue that will trigger overdue notice * run misc/cronjobs/overdue_notices.pl -html and misc/cronjobs/printoverdues.sh to convert html file into pdf Without patch, all non unicode charaters are wrong encoded. With the patch, encoding is fine -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9208 Sophie MEYNIEUX <sophie.meynieux@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #28849|0 |1 is obsolete| | --- Comment #8 from Sophie MEYNIEUX <sophie.meynieux@biblibre.com> --- Created attachment 28866 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28866&action=edit Bug 9208 : Fix encoding of overdue letters When overdue letters templates contain symbol like euro, the conversion between html to pdf results in wrong encoding of special characters. Adding explicit utf8 encoding at the beginning of html file resolves this problem. This is already done for hold notices. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9208 --- Comment #9 from Sophie MEYNIEUX <sophie.meynieux@biblibre.com> --- Fixing some typo in the patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9208 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9208 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #28866|0 |1 is obsolete| | --- Comment #10 from Srdjan Jankovic <srdjan@catalyst.net.nz> --- Created attachment 30810 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30810&action=edit [SIGNED-OFF] Bug 9208 : Fix encoding of overdue letters When overdue letters templates contain symbol like euro, the conversion between html to pdf results in wrong encoding of special characters. Adding explicit utf8 encoding at the beginning of html file resolves this problem. This is already done for hold notices. Signed-off-by: Srdjan <srdjan@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9208 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am sorry, but I can't get this to work correctly. When running the overdue_notices.pl -html ./ I ended up with an almost empty html file, although I have pending ODUE notices of the type print in my message_queue table and I have a print template defined in my notices. <html> <head> <meta charset="utf-8" /> <style type='text/css'> pre {page-break-after: always;} pre {white-space: pre-wrap;} pre {white-space: -moz-pre-wrap;} pre {white-space: -o-pre-wrap;} pre {word-wrap: break-work;} </style> </head> <body> </body> </html> ~ Also, I can't create a PDF easily, because the required PISA version is not available via apt-get for Ubuntu: **************************************************** IMPORT ERROR! Reportlab Version 2.1+ is needed! **************************************************** The following Python packages are required for PISA: - Reportlab Toolkit >= 2.2 <http://www.reportlab.org/> - HTML5lib >= 0.11.1 <http://code.google.com/p/html5lib/> Optional packages: - pyPDF <http://pybrary.net/pyPdf/> - PIL <http://www.pythonware.com/products/pil/> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9208 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=8687 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think there is an overlap of this patch and bug 8687 in both fixing the encoding. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9208 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |RESOLVED Resolution|--- |DUPLICATE --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Sophie, I think this problem is also fixed by 8687 - please reopen if I am mistaken. *** This bug has been marked as a duplicate of bug 8687 *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org