has event with name: XXX and accented letters

Hello Stuart

I was wondering about the GCal feature that allows creating a trigger in PLEG " has event with name: XXXX" …

I can’t recall this feature is documented so, is this an exact match as the text “has event with name” implies? Or can I use a LUA pattern I had some problems getting this to work and part of that problem may be that I’m using accented characters in the event name.

BTW, I’ve noticed you always convert event names to uppercase when comparing. Problem is that the lua string.upper and string.lower follows the current locale (not working with accented characters)
Maybe You would like to consider doing a manual replace of the letters as the example I made in the attachment?

I force all keywords to upper case - so any matching needs also to be upper case. This was done to make matching more predictable in the face of small typing errors.

Partial match is still upper case - just that it looks for a substring within the event name e.g. keyword = TEST will match events TEST1 TEST2 1TEST MYTESTSEVENT etc

Thanks for pointing out about the accented characters - I will take a look and let you know.

[quote=“Stuart, post:2, topic:183371”]I force all keywords to upper case - so any matching needs also to be upper case. This was done to make matching more predictable in the face of small typing errors.

Partial match is still upper case - just that it looks for a substring within the event name e.g. keyword = TEST will match events TEST1 TEST2 1TEST MYTESTSEVENT etc

Thanks for pointing out about the accented characters - I will take a look and let you know.[/quote]

Thanks Stuart. Then I will make more testing here because I’m quite sure that a search for “FARANG” wont match the calender event with name “Farang tv?ttar” (tv?ttar means doing the laundry). Anyway I will dive deeper into this before . I will let You know and thanks again.

[quote=“Stuart, post:2, topic:183371”]I force all keywords to upper case - so any matching needs also to be upper case. This was done to make matching more predictable in the face of small typing errors.

Partial match is still upper case - just that it looks for a substring within the event name e.g. keyword = TEST will match events TEST1 TEST2 1TEST MYTESTSEVENT etc

Thanks for pointing out about the accented characters - I will take a look and let you know.[/quote]

Hi Stuart!

I did some testing today. I defined a trigger in PLEG. See attached pic. t2 will only become true on an exact match, that is if I have a calendar event with the title “Testing”. The trigger won’t trigger if the title of the event is “Testing laundry” for example. (Running PLEG V 7.11).

About the accented characters, here’s a picture showing the letter “a-ring” as lower case. I will avoid trying to match any accented characters in a PLEG trigger as in the picture in the post above. Now, it’s only a cosmetic issue for me but I guess it might confuse some users.

Thank You Stuart. ;D

[quote=“farang, post:5, topic:183371”]About the accented characters, here’s a picture showing the letter “a-ring” as lower case. I will avoid trying to match any accented characters in a PLEG trigger as in the picture in the post above. Now, it’s only a cosmetic issue for me but I guess it might confuse some users.

Thank You Stuart. ;D[/quote]

Take a look a the version here

[url=http://forum.micasaverde.com/index.php/topic,26692.msg197910.html#msg197910]http://forum.micasaverde.com/index.php/topic,26692.msg197910.html#msg197910[/url]

you need the other files in the zip as well

Thank You Stuart!

It works very well :smiley: