• 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: string encoding in NSMutableData
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: string encoding in NSMutableData


  • Subject: Re: string encoding in NSMutableData
  • From: "Paolo Manna" <email@hidden>
  • Date: Wed, 8 Aug 2007 17:42:37 +0100

On 08/08/07, Paolo Manna <email@hidden> wrote:
> >  output = [NSMutableData dataWithBytes:[key cStringUsingEncoding: NSUnicodeStringEncoding]
> >                                                        length:4];
> Not knowing what you're using your data for, if you want to get 1 byte
> for each character you input, you'd better use something like
> NSASCIIStringEncoding: it's lossy anyway, but in a predictable way.
Correcting myself: DO NOT use cStringUsingEncoding: for conversions,
because it will not deal with lossy ones, I was actually referring to
dataUsingEncoding:allowLossyConversion:

Paolo
_______________________________________________

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

References: 
 >Re: string encoding in NSMutableData (From: "Paolo Manna" <email@hidden>)

  • Prev by Date: Re: string encoding in NSMutableData
  • Next by Date: Re: Integrating Unix scripting in Cocoa app
  • Previous by thread: Re: string encoding in NSMutableData
  • Next by thread: Re: string encoding in NSMutableData
  • Index(es):
    • Date
    • Thread