Hi, What's the correct way to open a text file? I'm using:
NSError *error = nil; NSStringEncoding encoding; [myMutableString setString:[NSString stringWithContentsOfFile:filePath usedEncoding:&encoding error:&error]]; but on some files (say, Western Mac OS Roman) it crashes. 0x91dc507e <+0334> call 0x91e68a50 <CFLog> 0x91dc5083 <+0339> mov %esi,(%esp) 0x91dc5086 <+0342> call 0x91ebf566 <dyld_stub_OSSpinLockUnlock> 0x91dc508b <+0347> lea -0x80(%ebp),%esi 0x91dc508e <+0350> mov %esi,(%esp) 0x91dc5091 <+0353> call 0x91ebfb36 <dyld_stub_objc_exception_try_enter> 0x91dc5096 <+0358> mov %esi,(%esp) 0x91dc5099 <+0361> call 0x91ebf61a <dyld_stub__setjmp> > 0x91dc509e <+0366> test %eax,%eax 0x91dc50a0 <+0368> jne 0x91dc535a <CFRunLoopRunSpecific+1066> 0x91dc50a6 <+0374> mov -0x1c(%ebp),%eax 0x91dc50a9 <+0377> testb $0x1,0x2c(%eax) 0x91dc50ad <+0381> jne 0x91dc50b9 <CFRunLoopRunSpecific+393> 0x91dc50af <+0383> mov -0x1c(%ebp),%eax 0x91dc50b2 <+0386> mov 0x24(%eax),%eax 0x91dc50b5 <+0389> test %eax,%eax 0x91dc50b7 <+0391> je 0x91dc50c9 <CFRunLoopRunSpecific+409> 0x91dc50b9 <+0393> mov -0x1c(%ebp),%edx 0x91dc50bc <+0396> mov 0x8(%ebp),%eax 0x91dc50bf <+0399> mov $0x1,%ecx 0x91dc50c4 <+0404> call 0x91e08e40 <__CFRunLoopDoObservers> Any ideas? _______________________________________________ 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