• 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: SQLite and Unicode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SQLite and Unicode


  • Subject: Re: SQLite and Unicode
  • From: Rosyna <email@hidden>
  • Date: Tue, 7 Apr 2009 14:32:49 -0700

You could try using - (NSRange)rangeOfComposedCharacterSequenceAtIndex: (NSUInteger)index; and see if the range is >1. But right now, I'm watching the highly informative humorist Glenn Beck.

Oh, >1 was to pass over surrogate pairs, so you don't pass over anything.

But honestly, you should never have a reason to use charactersAtIndex:. It's too similar to treating a string as a bucket of bits instead of strings.

Instead, might I suggest creating a character set of all your "ending sentences thingamajigs" and then use - rangeOfCharacterFromSet:options:range: and break it up from there.

On Apr 7, 2009, at 11:54 AM, Тимофей Даньшин wrote:

I will now have to find another "unicode-safe" way to split the string into sentences.




---
Sincerely,
Rosyna Keller
Technical Support/Carbon troll/Always needs a hug

Unsanity: Unsane Tools for Insanely Great People

It's either this, or imagining Phil Schiller in a thong.

_______________________________________________

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: 
 >Re: SQLite and Unicode (From: Greg Guerin <email@hidden>)
 >Re: SQLite and Unicode (From: Тимофей Даньшин <email@hidden>)

  • Prev by Date: Re: Core data migration question
  • Next by Date: Re: SQLite and Unicode
  • Previous by thread: Re: SQLite and Unicode
  • Next by thread: Re: SQLite and Unicode
  • Index(es):
    • Date
    • Thread