If you do an e-mail merge with an attachment and the filename has foreign characters (e. g. German umlauts) the resulting mail has incorrect MIME headers (first part of "Content-Disposition" I suppose). Some mail programs will ignore this and show the attachment anyway (Mac OS mail.app which renames the attachment to a default name). Others fail to show the attachment completely (tested with different Webmailers, MS Outlook, ...). Some examples: LibO 3.6 (note the unnecessary UTF-encoded "attachment;") --===============1083777418== Content-Type: application/pdf MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: =?utf-8?q?attachment=3B_filename=3D=22Fru=CC=88hlingsm?= =?utf-8?q?arkt_2013_Bewerbungsbogen=2Epdf=22?= A "correct" (readable by all tested mail apps) version produced by Thunderbird --------------070803060102000807020303 Content-Type: application/pdf; name="erw poliz =?UTF-8?B?RnXMiGhydW5nc3pldWduaXMucGRm?=" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename*0*=UTF-8''%65%72%77%20%70%6F%6C%69%7A%20%46%75%CC%88%68%72%75%6E; filename*1*=%67%73%7A%65%75%67%6E%69%73%2E%70%64%66 Or something like this (Kerio Connect WebMail with different char set): -------------bde77112a49a8fcc00e1f31ee505516f Content-Type: application/pdf Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="=?iso-8859-1?Q?=DCmlaute=2Epdf?="
Check out bug 38713 and see whether it is the same problem. It might be that the fix for that bug was incomplete, or has accidentally been reverted. Alex
Adding Caolan to CC. Does this ring a bell ? Alex.
Alex, https://bugs.freedesktop.org/show_bug.cgi?id=38713 was something about multiple recipients. No problem here. I can mailmerge to hundreds of recipients with no error. The attachment is included in the "source" of the mail body but is visible only to those with a MUA not taking RFC 2183 too literal. If it not the disposition-type please feel free to ask for more or complete samples. TIA -- Rolf
Dear Bug Submitter, This bug has been in NEEDINFO status with no change for at least 6 months. Please provide the requested information as soon as possible and mark the bug as UNCONFIRMED. Due to regular bug tracker maintenance, if the bug is still in NEEDINFO status with no change in 30 days the QA team will close the bug as INVALID due to lack of needed information. For more information about our NEEDINFO policy please read the wiki located here: https://wiki.documentfoundation.org/QA/FDO/NEEDINFO If you have already provided the requested information, please mark the bug as UNCONFIRMED so that the QA team knows that the bug is ready to be confirmed. Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team
I checked again with 4.0.3.3 and Mac OS X 10.8.4: Mailmerge will not send a PDF attachment with foreign characters (e. g. German Umlaut) in filename - now it crashes with the following python error <class 'TypeError'>: quote() doesn't support 'encoding' for bytes, traceback follows /Applications/LibreOffice.app/Contents/program/LibreOfficePython.framework/Versions/Current/lib/python3.3/urllib/parse.py:695 in function quote() [raise TypeError("quote() doesn't support 'encoding' for bytes")] /Applications/LibreOffice.app/Contents/program/LibreOfficePython.framework/Versions/Current/lib/python3.3/email/utils.py:265 in function encode_rfc2231() [s = urllib.parse.quote(s, safe='', encoding=charset or 'ascii')] /Applications/LibreOffice.app/Contents/program/LibreOfficePython.framework/Versions/Current/lib/python3.3/email/message.py:56 in function _formatparam() [value = utils.encode_rfc2231(value[2], value[0], value[1])] /Applications/LibreOffice.app/Contents/program/LibreOfficePython.framework/Versions/Current/lib/python3.3/email/message.py:490 in function add_header() [parts.append(_formatparam(k.replace('_', '-'), v))] /Applications/LibreOffice.app/Contents/program/mailmerge.py:246 in function sendMailMessage() [filename=fname)]
Confirming. I can reproduce the problem on : The error message : <class 'TypeError'>: quote() doesn't support 'encoding' for bytes, traceback follows /Applications/LibreOfficeDev.app/Contents/program/LibreOfficePython.framework/Versions/Current/lib/python3.3/urllib/parse.py:695 in function quote() [raise TypeError("quote() doesn't support 'encoding' for bytes")] /Applications/LibreOfficeDev.app/Contents/program/LibreOfficePython.framework/Versions/Current/lib/python3.3/email/utils.py:265 in function encode_rfc2231() [s = urllib.parse.quote(s, safe='', encoding=charset or 'ascii')] /Applications/LibreOfficeDev.app/Contents/program/LibreOfficePython.framework/Versions/Current/lib/python3.3/email/message.py:56 in function _formatparam() [value = utils.encode_rfc2231(value[2], value[0], value[1])] /Applications/LibreOfficeDev.app/Contents/program/LibreOfficePython.framework/Versions/Current/lib/python3.3/email/message.py:490 in function add_header() [parts.append(_formatparam(k.replace('_', '-'), v))] /Applications/LibreOfficeDev.app/Contents/program/mailmerge.py:246 in function sendMailMessage() [filename=fname)] Alex
@Caolan : any insight ? Alex
Forgot to mention that this is also confirmed in my master build : Version: 4.2.0.0.alpha0+ Build ID: c2530b02311c46529eed53ee688bf6c83ce4b86 Alex
However, the app as a whole does not crash, only the mailmerge functionality fails with the python error message you indicated. I can close the mailmerge window and continue working with LO, but yes this does mean that that particular bit doesn't work. Also, there appears to be a workaround in that you can rename the pdf file that LO creates in the "File Name" dialog to not contain any extended characters. Alex
Hmmm, I appear to have discovered another problem - the document that got sent as a PDF was completely empty, just a blank sheet, whereas the ODT document used as the basis for the mailmerge contained text, and at least the salutations. This might already be registered as a bug in the system, will check it out. Alex
Caolan McNamara committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=06f22f5ae0eafe094b280f03c770eebdbb33d403 Resolves: fdo#55411 python 2 vs 3 str/bytes encoding issues The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
should be good in master, proposing for 4-1
Caolan McNamara committed a patch related to this issue. It has been pushed to "libreoffice-4-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=540a681e4d6ed0d88a542c843dbf534fb661abf8&h=libreoffice-4-1 Resolves: fdo#55411 python 2 vs 3 str/bytes encoding issues It will be available in LibreOffice 4.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Caolan McNamara committed a patch related to this issue. It has been pushed to "libreoffice-4-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=350994ffdc51787ecd51a8b7ce4e504c2432dd9d&h=libreoffice-4-0 Resolves: fdo#55411 python 2 vs 3 str/bytes encoding issues It will be available in LibreOffice 4.0.5. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
works on osx with my latest master build too