discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: apple plist loading failed


From: Fred Kiefer
Subject: Re: apple plist loading failed
Date: Mon, 02 Aug 2004 16:25:09 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040114

Karsten Fuhrmann wrote:
When i try to load an apple plist file in GNUstep i get the following error:

File NSString.m: 1459. In [(nil) +initWithContentsOfFile:] Contents of file '/home/karsten/linidigibibi/ldp/ldp.app/Resources/
unicode.plist' are not string data

On OS X it works.

The plist contains a normal dictionary in ISO-8859-1 encoding.

The only special thing is that some values are empty for some keys.


This should not be the problem. The loading fails long before the data is treated as a property list. What is failing seems to be the conversion of the string, the questiuon is what format is GNUstep thinking the file is in? This depends on the actual file format (Unicode?) and the GNUstep default encoding settings (Set
GNUSTEP_STRING_ENCODING to NSISOLatin1StringEncoding)
On the other hand, why would you convert a property list file to a strign first, before converting it to a property list? That is, your applicatin seems to use [NSString stringWithContentsOfFile:] and [NSPropertyListSerialization propertyListFromString:], why don't you use [NSPropertyListSerialization propertyListFromData:] directly?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]