On 29 Dec 2008, at 03:02, "Gerriet M. Denkmann" <gerr...@mdenkmann.de> wrote:


I have a NSTextView which contains "บุ" that is: THAI CHARACTER BO
BAIMAI + THAI CHARACTER SARA U, which is a consonant, followed by a
vowel.

When I use the Find Panel to search for "บ" (using "Contains" or:
"Starts with") nothing is found.

Same in TextEdit; same with any character + Nonspacing_Mark.

When I enter "a" + COMBINING DIAERESIS and search for "ä" (LATIN SMALL LETTER A WITH DIAERESIS) the character, which looks like "ä" is found.
Searching for "a" does not find it.
This makes some sense.

But to treat "นุ" as one letter is just plain silly and quite wrong.

How can I tell the Find Panel (or the NSTextView) to find my
characters, even if they are followed by some other character?

10.5.6

I tried this:
NSString *bu = @"บุ";
NSString *ba = @"บ";
NSRange ra = [ bu rangeOfString: ba ];
if ( ra.location == NSNotFound )
{
        NSLog(@"%s There is no \"%...@\" in \"%...@\"",__FUNCTION__, ba, bu );
}
else
{
NSLog(@"%s range of \"%...@\" in \"%...@\" is %@",__FUNCTION__, ba, bu, NSStringFromRange(ra));
};

and got the answer:
 There is no "บ" in "บุ"
which somehow boggles my mind (might be a problem of aforementioned mind though).

What do I do now: write my own version of rangeOfString: ? I would rather like to avoid this.


Kind regards,

Gerriet.


_______________________________________________

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(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to