mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-25 13:25:28 +00:00
see changelog
Monotone-Parent: 1011e8e7cab7e718b62aa03f637fa6a37349d95c Monotone-Revision: 06aa9d65ffbfa422bd62686e09571834da68af2f Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2007-11-25T17:26:56 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
|
||||
- (NSString *) subject
|
||||
{
|
||||
return [sourceMail subject];
|
||||
return [sourceMail decodedSubject];
|
||||
}
|
||||
|
||||
- (NSString *) date
|
||||
@@ -155,7 +155,7 @@
|
||||
|
||||
signature = [[context activeUser] signature];
|
||||
if ([signature length])
|
||||
mailSignature = [NSString stringWithFormat: @"--\r\n%@", signature];
|
||||
mailSignature = [NSString stringWithFormat: @"-- \n%@", signature];
|
||||
else
|
||||
mailSignature = @"";
|
||||
|
||||
|
||||
@@ -659,17 +659,21 @@ static BOOL debugSoParts = NO;
|
||||
charset = [[_info valueForKey: @"parameterList"] valueForKey: @"charset"];
|
||||
if (![charset length])
|
||||
{
|
||||
s = [[NSString alloc] initWithData: mailData encoding: NSUTF8StringEncoding];
|
||||
[s autorelease];
|
||||
s = nil;
|
||||
}
|
||||
else
|
||||
{
|
||||
s = [NSString stringWithData: mailData usingEncodingNamed: charset];
|
||||
|
||||
// If it has failed, we try at least using UTF-8. Normally, this can NOT fail
|
||||
if (!s)
|
||||
s = [[[NSString alloc] initWithData: mailData encoding: NSISOLatin1StringEncoding] autorelease];
|
||||
}
|
||||
|
||||
// If it has failed, we try at least using UTF-8. Normally, this can NOT fail.
|
||||
// Unfortunately, it seems to fail under GNUstep so we try latin1 if that's
|
||||
// the case
|
||||
if (!s)
|
||||
s = [[[NSString alloc] initWithData: mailData encoding: NSUTF8StringEncoding] autorelease];
|
||||
|
||||
if (!s)
|
||||
s = [[[NSString alloc] initWithData: mailData encoding: NSISOLatin1StringEncoding] autorelease];
|
||||
}
|
||||
else
|
||||
s = nil;
|
||||
|
||||
@@ -70,7 +70,21 @@
|
||||
|
||||
- (NSString *) messageBody
|
||||
{
|
||||
return [[sourceMail contentForEditing] stringByApplyingMailQuoting];
|
||||
NSString *s;
|
||||
|
||||
s = [sourceMail contentForEditing];
|
||||
|
||||
if (s)
|
||||
{
|
||||
NSRange r;
|
||||
|
||||
r = [s rangeOfString: @"\n-- \n" options: NSBackwardsSearch];
|
||||
|
||||
if (r.length)
|
||||
s = [s substringToIndex: r.location];
|
||||
}
|
||||
|
||||
return [s stringByApplyingMailQuoting];
|
||||
}
|
||||
|
||||
- (NSString *) signature
|
||||
@@ -79,7 +93,7 @@
|
||||
|
||||
signature = [[context activeUser] signature];
|
||||
if ([signature length])
|
||||
mailSignature = [NSString stringWithFormat: @"--\r\n%@", signature];
|
||||
mailSignature = [NSString stringWithFormat: @"-- \n%@", signature];
|
||||
else
|
||||
mailSignature = @"";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user