mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:38:12 +00:00
LibIMAP+Mail: Implement RFC2047 message header encoding
This enables us to display email subject fields with non-ASCII characters in Mail :^)
This commit is contained in:
parent
34adf9eeae
commit
077a8058c3
7 changed files with 176 additions and 1 deletions
|
@ -20,6 +20,7 @@
|
|||
#include <LibGUI/Statusbar.h>
|
||||
#include <LibGUI/TableView.h>
|
||||
#include <LibGUI/TreeView.h>
|
||||
#include <LibIMAP/MessageHeaderEncoding.h>
|
||||
#include <LibIMAP/QuotedPrintable.h>
|
||||
|
||||
MailWidget::MailWidget()
|
||||
|
@ -396,6 +397,10 @@ void MailWidget::selected_mailbox()
|
|||
if (subject.is_empty())
|
||||
subject = "(No subject)";
|
||||
|
||||
if (subject.contains("=?"sv) && subject.contains("?="sv)) {
|
||||
subject = MUST(IMAP::decode_rfc2047_encoded_words(subject));
|
||||
}
|
||||
|
||||
auto& from_iterator_value = from_iterator->get<1>().value();
|
||||
auto from_index = from_iterator_value.find("From:"sv);
|
||||
if (!from_index.has_value())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue