Project

General

Profile

Bug #6762

Unicode in mail attachement file name

Added by S ET about 4 years ago. Updated about 4 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
11/23/2018
Due date:
% Done:

0%

Estimated time:

Description

If a Wt::Mail::Message contains an attachement whose file name includes unicode characters, the recipient doesn't get an attachement, but the file content in the message body :

example:

%PDF-1.4

%äüöß

2 0 obj

<>

stream

xœ¥XI«ä6¾÷¯ðy ...

...

The same file will be received as a regular attachement if the file name is normalized.

Wt::Mail::Message documentation states "Recipient names, names, and body text may contain unicode text.". I suppose file names cannot yet contain unicode characters.

I wish someone can confirm this behavior.

Can Wt developers tell whether it's a frozen feature, or if it may change in the future ?

Thanks.

#1

Updated by Roel Standaert about 4 years ago

It looks like we're currently just adding the filename as is, using:

Content-Disposition: attachment; filename="file.txt"

This is defined as only supporting ASCII: https://tools.ietf.org/html/rfc2183

I don't see what would prevent us from maybe making it possible to add the filename using UTF-8 encoding. This blog post seems to suggest it's not entirely straightforward, though: https://blog.nodemailer.com/2017/01/27/the-mess-that-is-attachment-filenames/

I guess it would require some testing to see what different mail clients do with the filename.

Also available in: Atom PDF