• 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
NSStringEncoding -> NSCharacterSet?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSStringEncoding -> NSCharacterSet?


  • Subject: NSStringEncoding -> NSCharacterSet?
  • From: Dan Wood <email@hidden>
  • Date: Wed, 18 Jan 2006 11:26:16 -0800

I'm looking for some inspiration on how to figure out the NSCharacterSet of characters "covered" by a particular NSStringEncoding. (Or the Core Foundation equivalents, CFStringEncoding and CFCharacterSet).

For instance, something that would map:
	NSASCIIStringEncoding to the character set of 0..127,
	NSISOLatin1StringEncoding to 0....255 (I think)
	NSWindowsCP1251StringEncoding to the set unicode cyrillic characters,
	NSShiftJISStringEncoding to the set of Japanese characters,
	etc.

I am looking for this information so that I can take an arbitrary unicode string, destined for conversion to HTML, and know which characters do *not* fit in the specified NSStringEncoding, as those that need to be 'escaped' (like &#123;).

It seems like there is very little exposed in the Cocoa/CF APIs to do this. Any hints?

Thanks,
Dan Wood

_______________________________________________
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


  • Follow-Ups:
    • Re: NSStringEncoding -> NSCharacterSet?
      • From: Clark Cox <email@hidden>
  • Prev by Date: Re: WebConvertNSImageToCGImageRef Issues
  • Next by Date: Re: NSStringEncoding -> NSCharacterSet?
  • Previous by thread: Re: (hopefully) simple newb question
  • Next by thread: Re: NSStringEncoding -> NSCharacterSet?
  • Index(es):
    • Date
    • Thread