Hi clark,

turns out I had really misunderstood something about how some characters such as the german ß were stored.

I thought it was much more complex that it really is.

I thought the single character ß was composed of two grapheme clusters.

Actually:

      rangeOfComposedCharacterSequencesForRange:
      rangeOfComposedCharacterSequenceAtIndex:


will do their job just fine

but I wouldn't have figured that out if you hadn't asked me, so thank you.

cheers

mathew





On Tue, Feb 17, 2009 at 2:13 PM, mathew davis <compoundeye....@gmail.com > wrote:
Hello,

I need to break a string down into individual characters.

In English that's pretty easy.

But in some languages what a user perceives as a single block is actually a base character plus accents plus vowel markers plus tone markers plus...


eg:     เก

is made of

U+0E40 ( เ ) thai character sara e
U+0E01 ( ก ) thai character ko kai


To help with this NSString has the methods:

      rangeOfComposedCharacterSequencesForRange:
      rangeOfComposedCharacterSequenceAtIndex:

and CFString has:

      CFStringGetRangeOfComposedCharactersAtIndex.



but then some languages - like german, will sometimes combine certain
blocks together

so SS becomes ß

How, *exactly*, are the aforementioned methods/functions not working for you?

--
Clark S. Cox III
clarkc...@gmail.com

_______________________________________________

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 arch...@mail-archive.com

Reply via email to