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

Re: NSStringEncoding -> NSCharacterSet?


  • Subject: Re: NSStringEncoding -> NSCharacterSet?
  • From: John Stiles <email@hidden>
  • Date: Wed, 18 Jan 2006 11:58:04 -0800

Have you had actual complaints from users about UTF8?
In practice, it is not a big deal if a document is slightly larger than it "needs" to be. For example, have you ever looked at an RTF file with Japanese characters in it? It's atrociously inefficient. It turns out not to matter much.


On Jan 18, 2006, at 11:50 AM, Dan Wood wrote:

Alas, not all users want their pages encoded this way ... Japanese users, for example, where UTF-8 is not efficient, and ASCII + encoded entities is not very searchable, and really inefficient.


On Jan 18, 2006, at 11:32 AM, Clark Cox wrote:

2006/1/18, Dan Wood <email@hidden>:
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;).

I can't think of any API to do this, but if you're generating HTML,
why not just either:
- Use ASCII, and encode everything else as a character entity
- Use UTF-8, then you only have to encode special HTML characters such as '<'



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40blizzard.com


This email sent to email@hidden

_______________________________________________ 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
References: 
 >NSStringEncoding -> NSCharacterSet? (From: Dan Wood <email@hidden>)
 >Re: NSStringEncoding -> NSCharacterSet? (From: Clark Cox <email@hidden>)
 >Re: NSStringEncoding -> NSCharacterSet? (From: Dan Wood <email@hidden>)

  • Prev by Date: Re: (hopefully) simple newb question
  • Next by Date: New titanium interface available to Cocoa developers?
  • Previous by thread: Re: NSStringEncoding -> NSCharacterSet?
  • Next by thread: New titanium interface available to Cocoa developers?
  • Index(es):
    • Date
    • Thread