Clipboard issues, old data isn't cleared, encoding problems
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SikuliX |
In Progress
|
Medium
|
RaiMan |
Bug Description
Hi.
I ran across an issue (it occurs in about 1 out of 30 trials) where old data gets passed from the clipboard to the paste function.
Code:
type("c", KEY_CTRL)
adress = Env.getClipboar
and paste part... about 350 SLOC later:
For some reason it picks a random object from the clipboard (and sometimes its not even the last copied item either...)
And why am I doin it this way? Well, its because special characters (like ÅÄÖ) arent very popular and cant be written using the type() function. But paste(u"") works.
Is this a problem in SikuliX or the Clipboard or somewhere else?
Machine = Win7 Pro SP1
summary: |
- Clipboard issues, old data isnt cleared + Clipboard issues, old data isn't cleared, encoding problems |
information type: | Public → Public Security |
information type: | Public Security → Public |
There are some known issues with paste.
In this case, you could try to guard your paste this way:
pasteText = u"V\xC4GD 1" d().encode( 'iso-8859- 15'):
paste(pasteText)
if pasteText != Env.getClipboar
print "some error message"
exit(1)
BTW:
the IDE editor window accepts utf-8 characters produced by your keyboard and shows them as such.
Python at script run is told, that the script is encoded in utf-8
So you could use:
pasteText = u"VÄGD 1"
… and why are you not completely working in utf-8?