eM Client 10.4.5326 incorrectly saves attachments with RFC2231/RFC5987 encoded filenames on Windows 11

Description

I have encountered an issue when saving email attachments with Cyrillic filenames in eM Client 10.4.5326.

Environment

  • eM Client version: 10.4.5326 (97a2e75)
  • Operating System: Windows 11 Pro
  • Clean installation of Windows 11
  • Clean installation of eM Client
  • Newly created eM Client profile (not migrated from another system)

Issue

Attachments are displayed correctly inside the email message.

Examples:

  • исковое заявление.pdf
  • Канищев Денис Александрович..cer

However, when I select “Save Attachment” or “Save As…”, the filename automatically changes in the Save dialog to an RFC2231/RFC5987 encoded string such as:

UTF-8’'%D0%B8%D1%81%D0%BA%D0%BE%D0%B2%D0%BE%D0%B5%20%D0%B7%D0%B0%D1%8F%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5%2E%70%64%66

or

UTF-8’'%D0%9A%D0%B0%D0%BD%D0%B8%D1%89%D0%B5%D0%B2%20%D0%94%D0%B5%D0%BD%D0%B8%D1%81%20%D0%90%D0%BB%D0%B5%D0%BA%D1%81%D0%B0%D0%BD%D0%B4%D1%80%D0%BE%D0%B2%D0%B8%D1%87%2E%2E%63%65%72

The file is then saved using this encoded name.

Expected Behavior

The attachment should be saved using the decoded filename, for example:

  • исковое заявление.pdf
  • Канищев Денис Александрович..cer

MIME Header Examples

The emails contain valid RFC2231/RFC5987 filename parameters.

Example #1:

Content-Type: application/pdf;
name=“=?UTF-8?B?0LjRgdC60L7QstC+0LUg0LfQsNGP0LLQu9C10L3QuNC1LnBkZg==?=”
Content-Disposition: attachment;
filename0 =UTF-8’'%D0%B8%D1%81%D0%BA%D0%BE%D0%B2%D0%BE%D0%B5%20%D0%B7;
filename1 =%D0%B0%D1%8F%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5%2E%70%64%66
Content-Transfer-Encoding: base64

Example #2:

Content-Type: application/octet-stream;
name=“=?UTF-8?B?0JrQsNC90LjRidC10LIg0JTQtdC90LjRgSDQkNC70LXQutGB0LDQvdC0?=
=?UTF-8?B?0YDQvtCy0LjRhy4uY2Vy?=”
Content-Disposition: attachment;
filename0 =UTF-8’'%D0%9A%D0%B0%D0%BD%D0%B8%D1%89%D0%B5%D0%B2%20%D0%94;
filename1 =%D0%B5%D0%BD%D0%B8%D1%81%20%D0%90%D0%BB%D0%B5%D0%BA%D1%81;
filename2 =%D0%B0%D0%BD%D0%B4%D1%80%D0%BE%D0%B2%D0%B8%D1%87%2E%2E%63%65;
filename3 =%72
Content-Transfer-Encoding: base64

Additional Findings

  1. The attachment name is displayed correctly in the eM Client user interface.
  2. The incorrect encoded filename appears only when invoking “Save Attachment” or “Save As…”.
  3. This indicates that MIME parsing and filename decoding are working correctly for display purposes.
  4. The problem appears to occur specifically during the save operation.
  5. The same messages and attachments are handled correctly by Mozilla Thunderbird on the same Windows 11 system.
  6. The same type of messages were saved correctly on Windows 10.

System Information

Windows 11:

  • UI language: ru-RU
  • Base UI language: en-US
  • System locale: ru-RU

Code Pages:

  • ACP = 65001
  • OEMCP = 65001

Conclusion

It appears that during the attachment save operation, eM Client may be using the original RFC2231/RFC5987 filename parameter value (filename*, filename0 , filename1 , etc.) instead of the already decoded filename that is correctly displayed in the user interface.

Please investigate the handling of:

  • filename*
  • filename0
  • filename1
  • filename2
  • filename3

during attachment save operations.