On Apr 6, 2009, at 2:31 PM, Тимофей Даньшин wrote:
When I insert non-latin strings into my SQLite3 database, they turn
into some weird sets of characters (as I select those strings later
in Terminal), and the fields, which contain those strings, become
unusable by my application.
I
On Apr 7, 2009, at 8:14 PM, Keary Suska wrote:
Are you properly encoding your C strings with -cStringUsingEncoding:?
Yes, I think so.
At present, I am using the -UTF8String method, but I also tried the -
cStringUsingEncoding: to no avail.
Here is the line that binds the string to the
On Apr 7, 2009, at 10:39 AM, Тимофей Даньшин wrote:
On Apr 7, 2009, at 8:14 PM, Keary Suska wrote:
Are you properly encoding your C strings with -cStringUsingEncoding:?
Yes, I think so.
At present, I am using the -UTF8String method, but I also tried the -
cStringUsingEncoding: to no avail.
2009/4/7 Keary Suska cocoa-...@esoteritech.com:
On Apr 7, 2009, at 10:39 AM, Тимофей Даньшин wrote:
On Apr 7, 2009, at 8:14 PM, Keary Suska wrote:
Are you properly encoding your C strings with -cStringUsingEncoding:?
Yes, I think so.
At present, I am using the -UTF8String method, but I
How do you define string (i.e. how is its value set)? There can be
an issue with UTF8 constant strings. Have you called -
canBeConvertedToEncoding: to make sure string is utf-8 compatible?
To be on the safe side, i make a local copy of the method's input
string. And the
On Apr 7, 2009, at 12:54 PM, Тимофей Даньшин wrote:
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
Oops: prior (No subject) post is in SQLite and Unicode thread.
-- GG
___
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
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
Тимофей Даньшин 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
2009/4/7 Тимофей Даньшин ok5.ad...@gmail.com:
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
To break your text into sentences, I suggest swiping
componentsSeparatedByCharacterRunFromSet:
from:
http://thotzy.com/THOTZY/ComponentsSeparatedByCharacterRunFromSet%3A.html
-- and create a character set of your sentence-splitting characters to
prime it with.
If you need to preserve
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
Rosyna wrote:
Oh, 1 was to pass over surrogate pairs, so you don't pass over
anything.
rangeOfComposedCharacterSequenceAtIndex: is for more than surrogate
pairs. It also applies to base characters that have combining
accents following them. For example, the Latin letter 'e' followed
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.
Others have addressed your Unicode issues, but for splitting a string
into sentences (or other units), I'd use CFStringTokenizer with
Hello.
When I insert non-latin strings into my SQLite3 database, they turn
into some weird sets of characters (as I select those strings later in
Terminal), and the fields, which contain those strings, become
unusable by my application.
I googled for it for quite a bit, but everywhere it
15 matches
Mail list logo