Reputation: 1
I'm running Sikuli-X v2.0.5 on an Ubuntu 22.04 with lang="de_DE.UTF-8". I've some trouble to get the right text output if it has umlaute ä,ö,ü
For exemple if I try to output the text in a dialog box by
popup("Hallöchen von der Knäkente")
I get weired output where the umlaute are not displayed correctly. What I than tried is to switch to other encodeing like
pupup("Hallöchen von der Knäkente".encode("utf-8"))
But this does not work either. What do I have to use in order to get the umlaute display correctly via popup or konjunction Debug.user("text to output")
Tanks
Upvotes: 0
Views: 185
Reputation: 21
Can you try the following and let me know if it solved your problem?
At the beginning of your script add:
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
Ιnstead of encoding the string with UTF-8 try passing the string to the popup.
popup("Hallöchen von der Knäkente")
Upvotes: 0