Re: NSString -> char* ? Use -[NSString UTF8String].
Re: NSString -> char* ? Use -[NSString UTF8String].
- Subject: Re: NSString -> char* ? Use -[NSString UTF8String].
- From: Jörn Salewski <email@hidden>
- Date: Tue, 26 Aug 2003 20:59:23 +0200
I sometimes get this error message, when i'm copy-pasting code snippets from
the web. The solution is always to delete every blank in the code and
writing them back again manually. Apparently the compiler is complayning
about non-ascii characters, not about the syntax.
Jvrn
am 26.08.2003 19:29 Uhr schrieb Pei Xiang unter email@hidden:
>
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.
_______________________________________________
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.