← Back to team overview

sikuli-driver team mailing list archive

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: Solved => Open

Alex Nilsson is still having a problem:
Still having some issues with special chars, this time when I try to get
an username from the clipboard like so:


click(a text field containing the users full name, fx. "John Østergård")

type("a",KEY_CTRL + KEY_SHIFT)
type("c",KEY_CTRL)
fulllName =  Env.getClipboard().strip().encode("utf-8")
(name, surName) = fullName.split(" ",1)
name = name.encode("utf-8")
surName = surName.encode("utf-8")

click(Somewhere i need the surname pasted)
paste(surName)

result: ?sterg?rd
______________________

Now you can popup the name just fine, but when you paste or print it, i get the above result.
I've tried with the .decode, but that didn't help?

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.