• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: "Cue Sheet Parser" - Use NSString?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: "Cue Sheet Parser" - Use NSString?
      • From: Benjamin Frere <email@hidden>
References: 
 >"Cue Sheet Parser" - Use NSString? (From: Benjamin Frere <email@hidden>)

  • Prev by Date: Re: sizeToFit without actually changing the size?
  • Next by Date: Re: Best way of identifying duplicate files in Cocoa
  • Previous by thread: "Cue Sheet Parser" - Use NSString?
  • Next by thread: Re: "Cue Sheet Parser" - Use NSString?
  • Index(es):
    • Date
    • Thread