Fixed text/plain reencoding issues for Outlook
parent
ba258ca806
commit
72bec939d6
|
@ -285,20 +285,31 @@ struct GlobalObjectId {
|
|||
[self _sanitizedMIMEPart: body
|
||||
performed: b];
|
||||
}
|
||||
else if ([body isKindOfClass: [NSData class]] &&
|
||||
else if (([body isKindOfClass: [NSData class]] || [body isKindOfClass: [NSString class]]) &&
|
||||
[[[thePart contentType] type] isEqualToString: @"text"] &&
|
||||
([[[thePart contentType] subType] isEqualToString: @"plain"] || [[[thePart contentType] subType] isEqualToString: @"html"]))
|
||||
{
|
||||
// We make sure everything is encoded in UTF-8
|
||||
NSString *charset, *s;
|
||||
NGMimeType *mimeType;
|
||||
int encoding;
|
||||
NSString *s;
|
||||
|
||||
charset = [[thePart contentType] valueOfParameter: @"charset"];
|
||||
encoding = [NGMimeType stringEncodingForCharset: charset];
|
||||
if ([body isKindOfClass: [NSData class]])
|
||||
{
|
||||
NSString *charset;
|
||||
int encoding;
|
||||
|
||||
s = [[NSString alloc] initWithData: body encoding: encoding];
|
||||
AUTORELEASE(s);
|
||||
charset = [[thePart contentType] valueOfParameter: @"charset"];
|
||||
encoding = [NGMimeType stringEncodingForCharset: charset];
|
||||
|
||||
s = [[NSString alloc] initWithData: body encoding: encoding];
|
||||
AUTORELEASE(s);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Handle situations when SOPE stupidly returns us a NSString
|
||||
// This can happen for Content-Type: text/plain, Content-Transfer-Encoding: 8bit
|
||||
s = body;
|
||||
}
|
||||
|
||||
if (s)
|
||||
{
|
||||
|
|
1
NEWS
1
NEWS
|
@ -9,6 +9,7 @@ Bug fixes
|
|||
- avoid crashing when we forward an email with no Subject header
|
||||
- we no longer try to include attachments when replying to a mail
|
||||
- fixed ActiveSync repetitive events issues with "Weekly" and "Monthly" ones
|
||||
- fixed ActiveSync text/plain parts re-encoding issues for Outlook
|
||||
|
||||
2.2.4 (2014-05-29)
|
||||
------------------
|
||||
|
|
Loading…
Reference in New Issue