>> The call to -stringWithContentsOfFile: looks correct, but you're failing to check for errors. If it fails, it will return nil, and passing nil to setString: is illegal and will throw an exception.
right, right... most correct. I can catch the nil. >> This leaves the question of why -stringWithContentsOfFile: would fail. I'm not sure what heuristics that call uses, but you'd think it would be able to handle MacRoman, obsolete though it is. exactly the point germane, but in perusing NSString.h one is given to understand this method might not be as 'smart' as one could wish: -- "*These try to determine the encoding, and return the encoding which was used. Note that these methods might get "smarter" in subsequent releases of the system, and use additional techniques for recognizing encodings. If nil is returned, the optional error return indicates problem that was encountered (for instance, file system or encoding errors).*" -- ...alas poor lost MacRoman. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com