mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-03 12:28:51 +00:00
fix(activesync): Wrong decoding emails in Outlook via EAS. Force utf-8 when contnet-type is different than html part. Original fix from tfu. Fixes #5664
This commit is contained in:
@@ -410,7 +410,7 @@ struct GlobalObjectId {
|
||||
|
||||
charset = [[[self lookupInfoForBodyPart: key] objectForKey: @"parameterList"] objectForKey: @"charset"];
|
||||
|
||||
if (![charset length])
|
||||
if (![charset length] || [charset caseInsensitiveCompare: @"us-ascii"] == NSOrderedSame)
|
||||
charset = @"utf-8";
|
||||
|
||||
s = [NSString stringWithData: d usingEncodingNamed: charset];
|
||||
@@ -708,7 +708,7 @@ struct GlobalObjectId {
|
||||
|
||||
charset = [[[self lookupInfoForBodyPart: @""] objectForKey: @"parameterList"] objectForKey: @"charset"];
|
||||
|
||||
if (![charset length])
|
||||
if (![charset length] || [charset caseInsensitiveCompare: @"us-ascii"] == NSOrderedSame)
|
||||
charset = @"utf-8";
|
||||
|
||||
d = [[self fetchPlainTextParts] objectForKey: @""];
|
||||
|
||||
Reference in New Issue
Block a user