Re: Initializing a string with an NSData
Re: Initializing a string with an NSData
- Subject: Re: Initializing a string with an NSData
- From: Aki Inoue <email@hidden>
- Date: Fri, 29 Jun 2001 15:54:36 -0700
Candide,
Problem is: I don't know how to create a valid NSStringEncoding...
It depends on the content string encoding of your NSData.
If it's always guaranteed to be in plain ascii, you can specify
NSASCIIStringEncoding.
If the data is taken from some files that should match the user's
preference, you can use -[NSString defaultCStringEncoding] method.
Aki
On 2001.06.29, at 09:57, Candide Kemmler wrote:
Hi,
The foundation docs states:
- (id)initWithData:(NSData *)data
encoding:(NSStringEncoding)encoding
Problem is: I don't know how to create a valid NSStringEncoding...
Sorry for the stupid question, I'm just a beginner. BTW, I'm looking for
a good introduction to Objective-C for a non-C programmer (I'm a Java
programmer). Don't really know how to handle the * thing (pointers...).
Thanks,
Candide
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev