• 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
display unicode string one character at a time, not at simple as it seems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

display unicode string one character at a time, not at simple as it seems


  • Subject: display unicode string one character at a time, not at simple as it seems
  • From: mathew davis <email@hidden>
  • Date: Wed, 18 Feb 2009 09:13:45 +1100

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 ß

the document http://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries seems to have some good information about this,
so I'm not completely lost as to how to proceed. But this strikes me as one of those problems that other people have struck many times before,


any suggestions would be deeply appreciated.

thank you

mathew_______________________________________________

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: display unicode string one character at a time, not at simple as it seems
      • From: Michael Ash <email@hidden>
    • Re: display unicode string one character at a time, not at simple as it seems
      • From: Clark Cox <email@hidden>
  • Prev by Date: Re: NSNetService & NSURLConnection on Tiger
  • Next by Date: Re: display unicode string one character at a time, not at simple as it seems
  • Previous by thread: RE: Adding Multiple NSWindow or NSPanel into another NSWindow
  • Next by thread: Re: display unicode string one character at a time, not at simple as it seems
  • Index(es):
    • Date
    • Thread