The simplest way I've accomplished this is:[[NSString alloc] initWithCString:(const char *)nullTerminatedCString encoding:(NSStringEncoding)encoding];
Where encoding is :NSUTF8StringEncodingYou will then have to replace the "unknown" char with a "." with the NSString method:
stringByReplacingOccurrencesOfString:withString: Davide Scheriani wrote:
hello guys, is a way to convert an unicode string into a simple a-z>0-9 string and replace the other wierd chars into a "." (full stop)? im doing a small hex reader, so maybe this could help you. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/mcstoufer%40lbl.gov This email sent to [EMAIL PROTECTED]
-- * Martin C. Stoufer * * ISS/IT * * Lawrence Berkeley National Lab * * 510-486-5306 * * MS 937-700 *
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]