Re: How to get array of characters from NSString
Re: How to get array of characters from NSString
- Subject: Re: How to get array of characters from NSString
- From: Andy Lee <email@hidden>
- Date: Tue, 12 Aug 2008 14:04:13 -0400
Count me as another Spolsky defender.
On Aug 12, 2008, at 12:13 PM, Deborah Goldsmith wrote:
On Aug 12, 2008, at 8:41 AM, Kyle Sluder wrote:
http://www.joelonsoftware.com/articles/Unicode.html
That article is missing several concepts which are essential for
understanding Unicode; like many programmers, Mr. Spolsky thinks of
Unicode as "wide ASCII", which it is not. The article doesn't cover
surrogate pairs (the fact that he uses the term UCS-2 instead of
UTF-16 shows he's not up to date) or combining sequences (grapheme
clusters). If you're going to go groveling through Unicode text, you
need to understand both.
This article is a bit stuffy, but also more complete, and is even
shorter (I think):
http://unicode.org/standard/principles.html
Maybe I'm spoiled on Spolsky's breezy style, but I found this article
confusing and painful to read. It uses the term "code point" several
times before defining it two-thirds of the way down. In the first
paragraph it dives right into acronyms and version numbers without
defining a single concept:
"[...] Versions of the Unicode Standard are fully compatible and
synchronized with the corresponding versions of International Standard
ISO/IEC 10646. For example, Unicode 5.1 contains all the same
characters and encoding points as ISO/IEC 10646:2003 plus amendments.
[...] Any implementation that is conformant to Unicode is also
conformant to ISO/IEC 10646."
For those who find the above intro fascinating, I won't keep you in
suspense. The article ends like this:
"The Unicode encoding forms correspond exactly to forms of use and
transformation formats also defined in ISO/IEC 10646. UTF-8 and UTF-16
are defined in Annexes to ISO/IEC 10646. And UTF-32 corresponds to the
four-octet form UCS-4 of ISO/IEC 10646."
This is also good:
http://icu-project.org/userguide/unicodeBasics.html
I found this much clearer and better-written than the first document
you referenced. It defines terms and concepts in an orderly
progression. But I would have found it drier and more difficult if I
hadn't read Spolsky first. Unless Spolsky is plainly, misleadingly,
dangerously wrong about something, I would recommend his article first
for anyone (like me) who needs to bone up on this stuff.
--Andy
_______________________________________________
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