• 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: NSString -> char* ? Use -[NSString UTF8String].
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSString -> char* ? Use -[NSString UTF8String].


  • Subject: Re: NSString -> char* ? Use -[NSString UTF8String].
  • From: Pei Xiang <email@hidden>
  • Date: Tue, 26 Aug 2003 10:29:43 -0700 (PDT)

thanks, but when i do:

NSString *path = @"filename.wav" ;
const char *infilename = [path UTF8String] ;

and compile, (tried other methods like cString as
well), i always get:

controller1.mm:44: stray '\312' in program
Build failed.

it is successful without the line, anything wrong?

Pei

--- Chris Hanson <email@hidden> wrote:
> On Monday, August 25, 2003, at 11:56 AM, Chris
> Garaffa wrote:
> > I'd check out the following NSString methods:
> > - cString:
> > - lossyCString:
> > - getCString: (and variants)
>
> I *wouldn't* check out the above methods; they're
> deprecated.
>
> > - UTF8String:


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: NSString -> char* ? Use -[NSString UTF8String].
      • From: Jörn Salewski <email@hidden>
References: 
 >Re: NSString -> char* ? Use -[NSString UTF8String]. (From: Chris Hanson <email@hidden>)

  • Prev by Date: Re: putting structs in NSArray
  • Next by Date: Re: Building menu's lazily
  • Previous by thread: Re: NSString -> char* ? Use -[NSString UTF8String].
  • Next by thread: Re: NSString -> char* ? Use -[NSString UTF8String].
  • Index(es):
    • Date
    • Thread