sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #06396
Re: [Question #176267]: Robot Framework Unicode Problem
Question #176267 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/176267
Status: Open => Answered
RaiMan proposed the following answer:
This means, that when your send_sms(phone_no, message) is used as a RFW-
Keyword in a test case, the propagation of the parameters through the
interfaces changes the coding information (utf-8) in this case or is not
realized by the Jython code in this situation.
Lets assume the second case:
# -*- coding: utf-8 -*-
tells the interpreter only, that the interpreted script (in this case,
when importing the module containing your def) might contain characters
encoded in utf-8. But it does not influence the way strings are
interpreted when running the script.
So if your args[1] really contains an utf-8 coded string (assumed here),
you have to tell this to the interpreter:
message = args[1].encode("utf-8")
or
message = unicode(args[1])
since when entering your def, the parameter is simply a normal ascii
string.
Pls. test, which one helps.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.