Re: "Cue Sheet Parser" - Use NSString?
Re: "Cue Sheet Parser" - Use NSString?
- Subject: Re: "Cue Sheet Parser" - Use NSString?
- From: Uli Kusterer <email@hidden>
- Date: Wed, 21 Nov 2007 00:32:25 +0100
Am 20.11.2007 um 22:45 schrieb Benjamin Frere:
- (id)initWithContentsOfFile:(NSString *)path encoding:
(NSStringEncoding)enc error:(NSError **)error
?
Cue Sheet are very shor text file, and I just need to read it to
parse it.
If they really are *text*, then yes. We've had some people here a
while ago trying to use NSString to read binary files, and they
weren't happy...
Just make sure you choose the right encoding. In 99% of the cases,
ASCII is the wrong encoding, because there is no such thing as Mac-
ASCII or Windows-ASCII... You may also want to have a look at the
NSScanner class, which is kinda helpful for parsing text of all kinds.
Cheers,
-- M. Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden