• 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: Converting between NSData and NSString losslessly
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting between NSData and NSString losslessly


  • Subject: Re: Converting between NSData and NSString losslessly
  • From: Dustin Voss <email@hidden>
  • Date: Sun, 24 Jul 2005 12:07:33 -0700

On 24 Jul 2005, at 12:30 AM, email@hidden wrote:

Actually, having investigated further, I've found that NSMacOSRomanStringEncoding seems to be lossless both ways. That's sort of solved the problem, from a practical point of view, but I still wonder whether it's the best approach... I'd rather use UTF-8, although I guess for the moment MacOS Roman should be sufficient. I also wonder whether this is in any way defined behaviour, that I can rely on?

I wouldn't. How I would handle your situation, is pull parts of your NSData that you know to be ASCII, and use those parts to tell if other parts are binary or ASCII, then, if necessary, pull out the content and convert.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >Converting between NSData and NSString losslessly (From: email@hidden)
 >Re: Converting between NSData and NSString losslessly (From: email@hidden)

  • Prev by Date: Problem centering inside a scrollview
  • Next by Date: Change cursor when dragging in NSTableView?
  • Previous by thread: Re: Converting between NSData and NSString losslessly
  • Next by thread: Problem with japanese systems
  • Index(es):
    • Date
    • Thread