Can't findText() with special character

Asked by Ben

Hello, so I'm trying to use findText() for a program, it work fine on words without special character, but when I try to find text with special character like é or è or à (for french words), it crash and do a traceback with a find failed.

I have OcrLanguage = Fra but it doesn't change anything.

Do you know if there is a solution ?

I was thinking about trying to find parts of the words without special character but it will be tedious for the rest of my program.

Thank you for your work on sikulix, hope we can find a solution !

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
masuo
Solved:
Last query:
Last reply:
Revision history for this message
Best masuo (masuo-ohara) said :
#1

literal strings must be surrounded by u" and ".

[example]
m = findText(u"é")
if m:
    m.highlight(1)

Revision history for this message
Ben (benvdg) said :
#2

Oh wow I didn't think about trying with the u"", thank you for your help masuo !

Have a good day !

Revision history for this message
Ben (benvdg) said :
#3

Thanks masuo, that solved my question.