Hi,

I recently discovered that a one of my GNUStep programs that parses Safari 
History.plist files can't parse the files in new versions of safari.

As a test ,when I compile and run the following code on OSX using a plist file, 
it tells me the "plist class" of the plist is "Detected format as 
NSCFDictionary".

When I run the same code compiled on GNUStep that's bundled with ubuntu 9.04, 
using the same plist file, it tells me the "plist class" is "Detected format as 
GSCBufferString"
and the program aborts.

Any ideas on how I can continue to parse these files using GNUstep?

Thanks

----------------------------------


#include <Foundation/Foundation.h>

// MAIN
int main (int argc, const char * argv[]) {

    // Defs.
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    NSData *plistData;
    NSString *error;
    NSPropertyListFormat format;
    id plist;
    id dict_val;


    plistData = [NSData dataWithContentsOfFile:
                          [NSString stringWithCString: argv[1]]];

    plist = [NSPropertyListSerialization propertyListFromData:plistData
      mutabilityOption:NSPropertyListMutableContainers format:&format
      errorDescription:&error];

      NSLog(@"%@",plist);
      NSLog(@"Detected format as %@", [plist class],plist) ;


      dict_val = [plist objectForKey: @"WebHistoryDates"];

      NSLog(@"%@",dict_val);
     

   [pool release];
    return 0;
} 

                                          
_________________________________________________________________
Hotmail: Powerful Free email with security by Microsoft.
http://clk.atdmt.com/GBL/go/196390710/direct/01/
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to