• 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: Тимофей Даньшин <email@hidden>
  • Date: Tue, 7 Apr 2009 22:54:51 +0400

I am deeply and sincerely ashamed of myself.
The point is that i get that input string by splitting the string in my textView ([[myTextView textStorage] string]) into sentences. During that procedure i check every char if it is a sentence terminator (?! or linebreak). And i do that by using the -characterAtIndex: method. And the thing is that that method returns wrong characters if it deals with unicode ones. Thanks Keary Suska for pointing that out to me.


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

Thanks again for all your help.
And if you could give me a hint on how to safely get unicode chars at a given position of a string, I'd be even more grateful :)


Timofey.

On Apr 7, 2009, at 10:23 PM, Greg Guerin wrote:

Тимофей Даньшин wrote:

To be on the safe side, i make a local copy of the method's input string.

Maybe the lifetime of the local copy is less than what SQLite needs.

I see in your code that you're releasing the copy, but is SQLite asynchronous and still needing the buffer to exist at that point?

If you don't use a copy of the arg string, but the original arg itself, does that change anything?

If you intentionally leak the copy, by not releasing it, does that change anything?

How about autoreleasing the copy, which defers the actual release until later?

I'm not suggesting that any of these are fixes, just different things to test and observe, that may lead to more clues.

 -- GG

_______________________________________________

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

_______________________________________________

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: SQLite and Unicode
      • From: "Adam R. Maxwell" <email@hidden>
    • Re: SQLite and Unicode
      • From: Rosyna <email@hidden>
    • Re: SQLite and Unicode
      • From: Michael Ash <email@hidden>
    • Re: SQLite and Unicode
      • From: Keary Suska <email@hidden>
References: 
 >Re: SQLite and Unicode (From: Greg Guerin <email@hidden>)

  • Prev by Date: (no subject)
  • 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