From: wolfgang Date: Tue, 15 May 2007 03:49:07 +0000 (+0000) Subject: git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1065 d1b88da0-ebda-0310... X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4305d84d1bfb04849207f8c1d8fed27171cc26e3;p=scalable-opengroupware.org git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1065 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/ChangeLog b/ChangeLog index fefc4345..9c1229d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2007-05-14 Wolfgang Sourdeau + + * SoObjects/Mailer/SOGoDraftObject.m ([NSString + -asQPSubjectString:encoding]): simplified method. + The headers indicates "utf-8" again thank to our fix in + sope-mime. + + * SoObjects/SOGo/SOGoObject.m: fail to build if libFoundation is + being used. + 2007-05-11 Wolfgang Sourdeau * UI/Common/UIxObjectActions.m ([UIxObjectActions diff --git a/SoObjects/Mailer/SOGoDraftObject.m b/SoObjects/Mailer/SOGoDraftObject.m index c8791ed5..fb871988 100644 --- a/SoObjects/Mailer/SOGoDraftObject.m +++ b/SoObjects/Mailer/SOGoDraftObject.m @@ -35,7 +35,7 @@ #include #include "common.h" -static NSString *contentTypeValue = @"text/plain; charset=iso-8859-1"; +static NSString *contentTypeValue = @"text/plain; charset=utf-8"; @interface NSString (NGMimeHelpers) @@ -48,23 +48,16 @@ static NSString *contentTypeValue = @"text/plain; charset=iso-8859-1"; - (NSString *) asQPSubjectString: (NSString *) encoding; { NSString *qpString; - unsigned char *data, *dest; - unsigned int dataLen, destLen; + NSData *subjectData, *destSubjectData; - dataLen = [self length]; - data = calloc(dataLen, sizeof (unsigned char*)); - [self getCString: (char *) data]; + subjectData = [self dataUsingEncoding: NSUTF8StringEncoding]; + destSubjectData = [subjectData dataByEncodingQuotedPrintable]; - destLen = dataLen * 3; - dest = calloc(dataLen * 3, sizeof (unsigned char*)); - NGEncodeQuotedPrintableMime (data, dataLen, dest, destLen); + qpString = [[NSString alloc] initWithData: destSubjectData + encoding: NSASCIIStringEncoding]; + [qpString autorelease]; - qpString = [NSString stringWithFormat: @"=?%@?Q?%s?=", encoding, dest]; - - free (data); - free (dest); - - return qpString; + return [NSString stringWithFormat: @"=?%@?Q?%@?=", encoding, qpString]; } @end @@ -659,7 +652,7 @@ static NSString *fromInternetSuffixPattern = nil; /* add subject */ if ([(s = [lInfo objectForKey:@"subject"]) length] > 0) - [map setObject: [s asQPSubjectString: @"iso-8859-1"] + [map setObject: [s asQPSubjectString: @"utf-8"] forKey:@"subject"]; // [map setObject: [s asQPSubjectString: @"utf-8"] forKey:@"subject"]; diff --git a/SoObjects/SOGo/SOGoObject.m b/SoObjects/SOGo/SOGoObject.m index 1cfc050e..5a0e5015 100644 --- a/SoObjects/SOGo/SOGoObject.m +++ b/SoObjects/SOGo/SOGoObject.m @@ -19,6 +19,11 @@ 02111-1307, USA. */ +#if LIB_FOUNDATION_LIBRARY +#error SOGo won't work properly with libFoundation. Please use gnustep-base \ + instead. +#endif + #import #import #import diff --git a/UI/Contacts/UIxContactFoldersView.m b/UI/Contacts/UIxContactFoldersView.m index 400eb6df..a2af399e 100644 --- a/UI/Contacts/UIxContactFoldersView.m +++ b/UI/Contacts/UIxContactFoldersView.m @@ -154,8 +154,8 @@ [contact objectForKey: @"cn"], [contact objectForKey: @"c_email"]]; [response setStatus: 200]; - [response setHeader: @"text/plain; charset=iso-8859-1" - forKey: @"Content-Type"]; +// [response setHeader: @"text/plain; charset=iso-8859-1" +// forKey: @"Content-Type"]; [response appendContentString: responseString]; contact = [contacts nextObject]; } diff --git a/UI/MainUI/SOGoUserHomePage.m b/UI/MainUI/SOGoUserHomePage.m index 65833f88..3b54ade1 100644 --- a/UI/MainUI/SOGoUserHomePage.m +++ b/UI/MainUI/SOGoUserHomePage.m @@ -156,8 +156,8 @@ response = [context response]; [response setStatus: 200]; - [response setHeader: @"text/plain; charset=iso-8859-1" - forKey: @"Content-Type"]; +// [response setHeader: @"text/plain; charset=iso-8859-1" +// forKey: @"Content-Type"]; [response appendContentString: [self _freeBusyAsText]]; return response; diff --git a/UI/Scheduler/UIxTimeDateControl.m b/UI/Scheduler/UIxTimeDateControl.m index e8b84a39..c36b8538 100644 --- a/UI/Scheduler/UIxTimeDateControl.m +++ b/UI/Scheduler/UIxTimeDateControl.m @@ -18,7 +18,6 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ #import #import diff --git a/UI/Templates/MailerUI/UIxMailEditor.wox b/UI/Templates/MailerUI/UIxMailEditor.wox index 213e48b0..709379cf 100644 --- a/UI/Templates/MailerUI/UIxMailEditor.wox +++ b/UI/Templates/MailerUI/UIxMailEditor.wox @@ -41,7 +41,7 @@ /> -