Re: How to convert UInt8 array to NSString
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