• 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: How to convert UInt8 array to NSString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to convert UInt8 array to NSString


  • Subject: Re: How to convert UInt8 array to NSString
  • From: Thomas Engelmeier <email@hidden>
  • Date: Tue, 6 May 2008 16:03:53 +0200


On 05.05.2008, at 18:20, Jens Alfke wrote:

I find it safest to go with the Windows encoding, because it's a superset of both ASCII and ISO-Latin-1 that maps all 256 characters, so it never returns nil. It's also the default encoding on Windows, so there's a lot of text out there in the wild encoded with it.)

As the OP wants to create NSStrings with data created by his application I'm pretty sure he will not want the the Windows encoding - unless he parses text documents originating from Windows.


If the bytes come from MacOS text files he may want to use the MacRoman encoding, otherwise creating UTF8 and passing around NSStrings will be the way to go - especially in Europe where all that äöüñá goodies exist.

Regards,
	Tom_E
_______________________________________________

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: How to convert UInt8 array to NSString
      • From: Jens Alfke <email@hidden>
References: 
 >How to convert UInt8 array to NSString (From: Marc Lohse <email@hidden>)
 >Re: How to convert UInt8 array to NSString (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Cannot remove an observer ... because it is not registered as an observer.
  • Next by Date: Re: -draggingEntered: never gets called [solved?]
  • Previous by thread: Re: How to convert UInt8 array to NSString
  • Next by thread: Re: How to convert UInt8 array to NSString
  • Index(es):
    • Date
    • Thread