Filter inconsistencies (bug?)

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
hliljegren
Posts: 111
Joined: Sun Aug 23, 2009 7:48 am
Contact:

Filter inconsistencies (bug?)

Post by hliljegren » Wed May 20, 2015 8:53 pm

If you try the following:

Code: Select all

put "SMART,SMARt,SmArT,smart,Nöje,NÖJE,NöJe,nöje,NÖje" into tStr
filter items of tStr with "smart"
You get every version of smart (SMART,SMARt,SmArT,smart) but if you do the following:

Code: Select all

put "SMART,SMARt,SmArT,smart,Nöje,NÖJE,NöJe,nöje,NÖje" into tStr
filter items of tStr with "nöje"
You only get Nöje,NöJe,nöje. i.e. all items where the lowercase 'ö' matches the lowercase 'ö' in nöje. All items with uppcase 'Ö' will be removed

You get the same result with ä vs Ä, å vs Å, é vs É etc. I.e. all characters with combined diacritical marks will not match case insensitive. Is this a bug or what?

If I do the following code:

Code: Select all

   if "nöje" is "NÖJE" then 
      answer "YES"
   else
      answer "NO"
   end if
The answer is "YES"...

:-Håkan (Which doesn't match HÅKAN when filtering...)
___________________________________
MacBook Pro M1 MAX 64 Gb,
LiveCode 10.0.1rc3

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: Filter inconsistencies (bug?)

Post by jmburnod » Fri May 22, 2015 5:08 pm

Hi hliljegren,

I think you have to use casesensitive

Code: Select all

set the casesensitive to true
put "SMART,SMARt,SmArT,smart,Nöje,NÖJE,NöJe,nöje,NÖje" into tStr
filter items of tStr with "smart"
set the casesensitive to false
Best regards
Jean-Marc
https://alternatic.ch

hliljegren
Posts: 111
Joined: Sun Aug 23, 2009 7:48 am
Contact:

Re: Filter inconsistencies (bug?)

Post by hliljegren » Wed May 27, 2015 8:14 am

Thanks for the suggestion but the problem is rather the opposite. If I enable case sensitivity I works as supposed but the problem is when case sensitivity if off (false) the lower case ´ö´doesn't match the upper case ´Ö´ and it looks like it is the same for every letter with combine diacritical marks. Sending a bug report now and see what they say...
___________________________________
MacBook Pro M1 MAX 64 Gb,
LiveCode 10.0.1rc3

Post Reply