mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-06 03:55:26 +00:00
fix(mail): force TNEF body parts to be decoded in UTF-8
This commit is contained in:
@@ -825,8 +825,14 @@ unsigned char GetRruleMonthNum(unsigned char a, unsigned char b) {
|
||||
ASSIGN (part, newPart);
|
||||
if (newPart)
|
||||
{
|
||||
NSMutableDictionary *info;
|
||||
|
||||
info = [NSMutableDictionary dictionaryWithDictionary: [newPart bodyInfo]];
|
||||
if ([newPart encoding])
|
||||
[info setObject: [newPart encoding]
|
||||
forKey: @"encoding"];
|
||||
[self setFilename: [[newPart bodyInfo] filename]];
|
||||
[self setPartInfo: [newPart bodyInfo]];
|
||||
[self setPartInfo: info];
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -884,6 +890,10 @@ unsigned char GetRruleMonthNum(unsigned char a, unsigned char b) {
|
||||
[map setObject: [NSString stringWithFormat: @"%@/%@", _type, _subtype]
|
||||
forKey: @"content-type"];
|
||||
|
||||
// Encoding
|
||||
[map setObject: @"utf-8"
|
||||
forKey: @"content-transfer-encoding"];
|
||||
|
||||
/* prepare body content */
|
||||
|
||||
content = [NSData dataWithBytes: [_data bytes] length: [_data length]];
|
||||
|
||||
Reference in New Issue
Block a user