Re: NSString and control-@ character
Re: NSString and control-@ character
- Subject: Re: NSString and control-@ character
- From: Ricky Sharp <email@hidden>
- Date: Mon, 3 Dec 2007 17:47:55 -0600
On Dec 3, 2007, at 5:23 PM, C Sandeep wrote:
Im a newbie to Objective-C and Cocoa. I need to send control-@
character
over a socket, for a wire protocol that Im working on.Im using
NSString to
encode the control-@ character as @"\0", but it didn't work. I have
google'd
and searched this mailing list to no avail. Any help regarding this
very
much appreciated. Thanks.
Don't use strings as control codes are either not allowed, or not
possible to store depending upon the encoding. Use raw bytes of data
instead. Depending upon the API being used, you can use NSData to
wrap your raw bytes.
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
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