From 512355c332645bd4f783ddfe44b54eaad0f8a7a8 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 4 Jul 2007 15:19:58 +0000 Subject: [PATCH] Monotone-Parent: 786be1077930a3e81cdf40e98c10118d781d5e23 Monotone-Revision: d24f07174457ea6b1b468933be949003bde413ed Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-07-04T15:19:58 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 +++++ SoObjects/Mailer/SOGoMailObject.m | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7eada783b..ed6583263 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-07-04 Wolfgang Sourdeau + + * SoObjects/Mailer/SOGoMailObject.m ([SOGoMailObject + -contentAsString]): returns the message encoded in UTF8. + 2007-07-03 Wolfgang Sourdeau * OGoContentStore/iCalRepeatableEntityObject+OCS.m diff --git a/SoObjects/Mailer/SOGoMailObject.m b/SoObjects/Mailer/SOGoMailObject.m index 6f7d6ad7a..a8b76bdb2 100644 --- a/SoObjects/Mailer/SOGoMailObject.m +++ b/SoObjects/Mailer/SOGoMailObject.m @@ -425,7 +425,8 @@ static BOOL debugSoParts = NO; return @"message/rfc822"; } -- (NSString *)contentAsString { +- (NSString *) contentAsString +{ NSString *s; NSData *content; @@ -434,8 +435,9 @@ static BOOL debugSoParts = NO; if ([content isKindOfClass:[NSException class]]) return (id)content; - s = [[NSString alloc] initWithData:content - encoding:NSISOLatin1StringEncoding]; +#warning the encoding here might be wrong... + s = [[NSString alloc] initWithData: content + encoding: NSUTF8StringEncoding]; if (s == nil) { [self logWithFormat: @"ERROR: could not convert data of length %d to string",