问题
I am trying to use some French special characters with Sikuli, when I type this in the Sikuli IDE,
App.open('C:\\à table\\app.exe')
But I get this error :
[log] App.open C:\Ã table\NDC.exe(0)
[error] App.open failed: C:\Ã table\NDC.exe not found
It seems that Sikuli doesn't handle utf-8 properly for the moment. All I could find in Google was the same problem with type() function and to use paste() instead, which uses the clipboard.
Is there a workaround in the case of App.open ?
Thanks a lot.
回答1:
Could make a bat file, and have App.Open('path/to/bat/file.bat')
which inside contains the path to the .exe
回答2:
The reason for this problem seems that Python 2.5.X doesn't support character encodings properly. One has to use tricks like encode('cp1252'), encode('utf8')...
Since Sikuli is based on Jython which is based on Python 2.5.2, we are stuck!
I wished I lived in a country only using the standard ASCII table, I really hate all these problems related to codepage and encodings.
来源:https://stackoverflow.com/questions/10698380/special-characters-in-sikuli-script