← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #686611]: Writing string from clipboard conataining æ ø å to file error

 

Question #686611 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/686611

Description changed to:
when copying text containing æ. ø or å i get this error

[error] UnicodeDecodeError ( 'ascii' codec can't decode byte 0xc3 in
position 36: ordinal not in range(128) )

I have tried different approaches without luck

This is my code
type("c", KEY_CTRL)
cb = Env.getClipboard().strip().encode("utf-8")
my_file.write(cb + Key.ENTER)

Error:

error] script [ pallex ] stopped with error in line 14
[error] UnicodeDecodeError ( 'ascii' codec can't decode byte 0xc3 in position 36: ordinal not in range(128) )
[error] --- Traceback --- error source first
line: module ( function ) statement 
14: main (  <module> )     my_file.write(cb + Key.ENTER)
[error] --- Traceback --- end --------------

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.