mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
Store mime_headers as BLOBs
Raw MIME messages may contain non-ASCII characters. Attempting to store them as TEXT by using String::from_utf8_lossy results in non-ASCII characters being replaced with Unicode U+FFFD "REPLACEMENT CHARACTER" which is later incorrectly decoded when attempting to parse `mime_headers` content into HTML.
This commit is contained in:
18
test-data/message/cp1252-html.eml
Normal file
18
test-data/message/cp1252-html.eml
Normal file
@@ -0,0 +1,18 @@
|
||||
Subject: test non-utf8 and dc_get_msg_html()
|
||||
To: tunis4 <tunis4@testrun.org>
|
||||
From: "B. Petersen" <bpetersen@b44t.com>
|
||||
Message-ID: <00007126-1efa-290b-2120-200251f50f23@b44t.com>
|
||||
Date: Thu, 27 May 2021 17:33:16 +0200
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=windows-1252; format=flowed
|
||||
Content-Language: en-US
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
foo bar <20> <20> <20> <20>
|
||||
|
||||
|
||||
-------- Forwarded Message --------
|
||||
Subject: Foo
|
||||
Date: Fri, 21 May 2021 08:42:20 +0000
|
||||
|
||||
just to force a "more button"
|
||||
Reference in New Issue
Block a user