• 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: Convert unicode string into ascii
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Convert unicode string into ascii


  • Subject: Re: Convert unicode string into ascii
  • From: Ricky Sharp <email@hidden>
  • Date: Thu, 28 Aug 2008 14:08:34 -0500

Just to point this out, the sequence of ASCII may not be useful at all if the file is say Unicode. The actual bytes making up each char could be "ASCII" values themselves.

Sent from my iPhone

On Aug 28, 2008, at 1:53 PM, Martin Stoufer <email@hidden> wrote:

The simplest way I've accomplished this is:

[[NSString alloc] initWithCString:(const char *)nullTerminatedCString encoding:(NSStringEncoding)encoding];

Where encoding is :NSUTF8StringEncoding

You 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 (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

-- * Martin C. Stoufer * * ISS/IT * * Lawrence Berkeley National Lab * * 510-486-5306 * * MS 937-700 *

_______________________________________________

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
_______________________________________________

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: Convert unicode string into ascii
      • From: Andrew Farmer <email@hidden>
References: 
 >Convert unicode string into ascii (From: Davide Scheriani <email@hidden>)
 >Re: Convert unicode string into ascii (From: Martin Stoufer <email@hidden>)

  • Prev by Date: Re: global key bindings
  • Next by Date: NSXMLNode and NSXMLElement issue
  • Previous by thread: Re: Convert unicode string into ascii
  • Next by thread: Re: Convert unicode string into ascii
  • Index(es):
    • Date
    • Thread