[Bug 13245] New: Send Cart via Email corrupts some Unicode characters
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13245 Bug ID: 13245 Summary: Send Cart via Email corrupts some Unicode characters Change sponsored?: --- Product: Koha Version: 3.12 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: pongtawat@punsarn.asia QA Contact: testopia@bugs.koha-community.org In OPAC -> Cart -> Send (via Email), if the comment text or the text in item list being send contains some specific Unicode character, the email received will have that character corrupted. Step to reproduce: - Go to OPAC, search for something - Add some item to cart - View your cart - Click "Send" - Enter your email address and enter "ออ" as the comment. - View your email, you will get something like "�¸ �" as comment. This is a known bug from HTML-Format used by html2text TT filter which was used to format email message: https://rt.cpan.org/Public/Bug/Display.html?id=9700 It can be easily fixed there by editing just one line as shown in the bug report above. However, it still not fixed as of HTML-Format v2.11. We may also fix this problem on Koha side as well by not using html2text and turn the template into plain text (or turn the email into HTML). Tested on 3.12, but this part of code is the same in master so it should be affected as well. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13245 Pongtawat <pongtawat@punsarn.asia> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |P3 Severity|enhancement |minor -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13245 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #1 from Frédéric Demians <frederic@tamil.fr> ---
- Enter your email address and enter "ออ" as the comment. - View your email, you will get something like "�¸ �" as comment.
This is a known bug from HTML-Format used by html2text TT filter which was used to format email message:
It works on master with French accented characters. Could your provide the culprit characters in an attached text file, and in a screenshot?
We may also fix this problem on Koha side as well by not using html2text and turn the template into plain text (or turn the email into HTML).
It's not an option. The template is in HTML in order to be translatable: see bug 8062. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13245 --- Comment #2 from Pongtawat <pongtawat@punsarn.asia> --- Created attachment 33605 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33605&action=edit Thai character that has problem -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13245 --- Comment #3 from Pongtawat <pongtawat@punsarn.asia> --- Created attachment 33606 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33606&action=edit Screenshot of Sent Cart page, showing how the comment should read -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13245 --- Comment #4 from Pongtawat <pongtawat@punsarn.asia> --- Created attachment 33607 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33607&action=edit Screenshot of email received Screenshot of email received, notice the broken letter. Some browser will just remove this character, while some other will switch to non-UTF8 encoding (which is worse) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13245 --- Comment #5 from Pongtawat <pongtawat@punsarn.asia> --- Thank you for make it clear why we need HTML there. I have attached an example and screenshots. The letter we have problem with is Thai character "อ" which is encoded in UTF8 as E0 B8 AD. The following code in HTML-Format will simply remove A0 and AD: $text =~ tr/\xA0\xAD/ /d; Hence the comment in the received email source in the example above is as follow: -------------------------------------------------------------------- =E0=B8=E0=B8=B2 - =E0=B9=80=E0=B8 - =E0=B9=82=E0=B8 - =E0=B8=E0=B8 -------------------------------------------------------------------- while the correct one should be: -------------------------------------------------------------------- =E0=B8=AD=E0=B8=B2 - =E0=B9=80=E0=B8=AD - =E0=B9=82=E0=B8=AD - =E0=B8=AD=E0=B8=AD -------------------------------------------------------------------- In my installation, I have switched Send Cart to HTML email, avoiding html2text, since HTML emails should be the norm now. IMO, it would be great if send cart could use easily-to-change template just like notice and slip. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org