• 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 and control-@ character
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSString and control-@ character
      • From: Alastair Houghton <email@hidden>
References: 
 >NSString and control-@ character (From: "C Sandeep" <email@hidden>)

  • Prev by Date: NSString and control-@ character
  • Next by Date: Re: custom control and nsformatter
  • Previous by thread: NSString and control-@ character
  • Next by thread: Re: NSString and control-@ character
  • Index(es):
    • Date
    • Thread