diff --git a/ChangeLog b/ChangeLog index d5c7cfaa4..ee249af5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,13 +1,24 @@ 2009-12-14 Wolfgang Sourdeau + * Tools/SOGoToolRemoveDoubles.m (-processFolder:ofUser:withFoM:): + same as below. + + * Tools/SOGoToolCheckDoubles.m (-processIndexResults:withFoM:): + same as below. + + * SoObjects/Mailer/NSString+Mail.m + (-stringByConvertingCRLNToHTML): invokde [NSString UTF8String] + rather than cStringUsingEncoding: NSUTF8StringEncoding, since the + latter provokes a crash that the former doesn't. + * UI/Common/UIxPageFrame.m (_stringsForFramework:): use the system default when the active user does not resolve. 2009-12-11 Ludovic Marcotte * Added a patch from Albrecht Gebhardt - that offers a "Reload" button in the Web contacts - management module. + that offers a "Reload" button in the Web contacts management + module. 2009-12-11 Wolfgang Sourdeau diff --git a/SoObjects/Mailer/NSString+Mail.m b/SoObjects/Mailer/NSString+Mail.m index 3d9244965..d9f9cc5f1 100644 --- a/SoObjects/Mailer/NSString+Mail.m +++ b/SoObjects/Mailer/NSString+Mail.m @@ -379,7 +379,8 @@ convertChars (const char *oldString, unsigned int oldLength, if (length + paddingBuffer > maxLength - 6) { maxLength += paddingBuffer; - reallocated = NSZoneRealloc (NULL, newString, maxLength + 1); + reallocated = NSZoneRealloc (NULL, newString, + maxLength + 1); if (reallocated) { newString = reallocated; @@ -408,13 +409,13 @@ convertChars (const char *oldString, unsigned int oldLength, - (NSString *) stringByConvertingCRLNToHTML { NSString *convertedString; + const char *utf8String; char *newString; unsigned int newLength; - newString - = convertChars ([self cStringUsingEncoding: NSUTF8StringEncoding], - [self lengthOfBytesUsingEncoding: NSUTF8StringEncoding], - &newLength); + utf8String = [self UTF8String]; + newString = convertChars (utf8String, strlen (utf8String), + &newLength); convertedString = [[NSString alloc] initWithBytes: newString length: newLength encoding: NSUTF8StringEncoding]; diff --git a/Tools/SOGoToolCheckDoubles.m b/Tools/SOGoToolCheckDoubles.m index 88c2bf52c..17c9964fc 100644 --- a/Tools/SOGoToolCheckDoubles.m +++ b/Tools/SOGoToolCheckDoubles.m @@ -92,20 +92,15 @@ { recordsCount = [currentFolder recordsCountByExcludingDeleted: YES]; if (recordsCount > warningLimit) - { - fprintf (stderr, "'%s' (id: '%s'), of '%s': %u entries\n", - [[folderRow objectForKey: @"c_foldername"] - cStringUsingEncoding: NSUTF8StringEncoding], - [[currentFolder folderName] - cStringUsingEncoding: NSUTF8StringEncoding], - [[folderRow objectForKey: @"c_path2"] - cStringUsingEncoding: NSUTF8StringEncoding], - recordsCount); - } + fprintf (stderr, "'%s' (id: '%s'), of '%s': %u entries\n", + [[folderRow objectForKey: @"c_foldername"] UTF8String], + [[currentFolder folderName] UTF8String], + [[folderRow objectForKey: @"c_path2"] UTF8String], + recordsCount); } else fprintf (stderr, "folder at path '%s' could not be opened\n", - [folderPath cStringUsingEncoding: NSUTF8StringEncoding]); + [folderPath UTF8String]); } } diff --git a/Tools/SOGoToolRemoveDoubles.m b/Tools/SOGoToolRemoveDoubles.m index a7ae5f31a..b5aa8a1fb 100644 --- a/Tools/SOGoToolRemoveDoubles.m +++ b/Tools/SOGoToolRemoveDoubles.m @@ -498,8 +498,7 @@ else { fprintf (stderr, "Folder '%s' of user '%s' not found.\n", - [folderId cStringUsingEncoding: NSUTF8StringEncoding], - [username cStringUsingEncoding: NSUTF8StringEncoding]); + [folderId UTF8String], [username UTF8String]); rc = NO; }