• 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: splitting CJK text into "words"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: splitting CJK text into "words"


  • Subject: Re: splitting CJK text into "words"
  • From: Martin Wierschin <email@hidden>
  • Date: Wed, 26 Sep 2012 15:05:02 -0700

>> I'm trying to split CJK text using the kind of word boundaries detected by -[NSAttributedString doubleClickAtIndex:]. That method does the job correctly, but only if the system preferences have the Word Break mode set to Japanese. I need to ensure this kind of word splitting independent of the user's system preferences.
>
> Does -[NSString enumerateSubstringsInRange:options:usingBlock:] with NSStringEnumerationByWords as the option work any better?

Thanks for the suggestion Ken, but no, it doesn't produce the results I'm looking for. It also isn't sensitive to the system's Word Break mode, whether I pass NSStringEnumerationLocalized or not. So basically enumerateSubstringsInRange:etc: seems to behave as CFStringTokenizer, but without offering the option of specifying a locale.

~Martin



_______________________________________________

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

References: 
 >splitting CJK text into "words" (From: Martin Wierschin <email@hidden>)
 >Re: splitting CJK text into "words" (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: splitting CJK text into "words"
  • Next by Date: Re: splitting CJK text into "words"
  • Previous by thread: Re: splitting CJK text into "words"
  • Next by thread: Re: splitting CJK text into "words"
  • Index(es):
    • Date
    • Thread