You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Subjects, sender names, and preview text are not in the right encoding before being saved to the database, particularly when MIME is in a weird encoding like gbk. This would mean these texts are displayed in the wrong format in the mail list, notifications being sent in the same wrong encoding too, and also these emails won't be searchable
However, the mail rendering page does display these texts without problems.
Tested on Windows 10 21H2 and Windows 11 23H2 & 24H2
Expected behavior
Encoding should be followed, but this should be MimeKit's job?!
Sample header: Subject: =?GBK?B?seDC67LiytQ=?=
Screenshots
Additional context
I did a bit of digging, but it seems Wino basically offloads all the parsing to MimeKit and isn't doing anything particularly special after getting a parsed MimeMessage.
Only difference between database entries and rendered mail: MIME for the database is directly parsed when returned from GetMessagesAsync, and MIME for rendered mail is parsed when loaded from file with LoadAsync. Maybe these two have different default options for parser? Needs further investigation
Should have done five minutes of search tbh... Already reported in #317, but not necessarily closing this because I'm too lazy to copy things over lmao
.NET Core (and ASP.NET Core by extension) and .NET 5 only provide the Unicode encodings, ASCII and ISO-8859-1 by default. Other text encodings are not available to your application unless your application registers the encoding provider that provides all of the additional encodings.
First, add a package reference for the System.Text.Encoding.CodePages nuget package to your project and then register the additional text encodings using the following code snippet:
Describe the bug
Subjects, sender names, and preview text are not in the right encoding before being saved to the database, particularly when MIME is in a weird encoding like
gbk
. This would mean these texts are displayed in the wrong format in the mail list, notifications being sent in the same wrong encoding too, and also these emails won't be searchableHowever, the mail rendering page does display these texts without problems.
Also reported by @loshine, #317 @dartraiden
Tested on Windows 10 21H2 and Windows 11 23H2 & 24H2
Expected behavior
Encoding should be followed, but this should be MimeKit's job?!
Sample header:
Subject: =?GBK?B?seDC67LiytQ=?=
Screenshots
Additional context
I did a bit of digging, but it seems Wino basically offloads all the parsing to MimeKit and isn't doing anything particularly special after getting a parsed MimeMessage.
Only difference between database entries and rendered mail: MIME for the database is directly parsed when returned from GetMessagesAsync, and MIME for rendered mail is parsed when loaded from file with LoadAsync. Maybe these two have different default options for parser? Needs further investigation
MailCopy:
Wino-Mail/Wino.Core/Synchronizers/ImapSynchronizer.cs
Lines 398 to 399 in 5258ae4
Rendered mail:
Wino-Mail/Wino.Core/Services/MimeFileService.cs
Lines 87 to 95 in 5258ae4
The text was updated successfully, but these errors were encountered: