sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #12596
Re: [Question #201882]: Replace chars in a var - string is UTF-8 encoded
Question #201882 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/201882
Status: Open => Solved
Alex Nilsson confirmed that the question is solved:
Ok, I've made a workaround:
fullName = Env.getClipboard().encode('utf-8')
DanishChars = ["Å", "Æ", "Ø"]
for char in DanishChars:
if char == "Å":
fullName = fullName.replace(char, "Aa")
if char == "Æ":
fullName = fullName.replace(char, "Ae")
if char == "Ø":
fullName = fullName.replace(char, "Oe")
paste(fullName.encode('utf-8'))
I don't know if the problem is with xp in general or with our computer setup in particular, but the above will work and I hope someone else, should the be so unlucky as to experience the same problem, will benefit from the thread.
And I'd like to (once again) thank Raimund for all his help, it's appreciated :-)
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.