Re: [Sikuli-driver] [Question #670783]: Different character encoding when using CMD instead of IDE

2018-07-26 Thread RaiMan
Question #670783 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/670783

Status: Open => Answered

RaiMan proposed the following answer:
sorry for ignoring.
I will take a look now.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #670783]: Different character encoding when using CMD instead of IDE

2018-07-26 Thread Max
Question #670783 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/670783

Status: Expired => Open

Max is still having a problem:
the issue still exists. can i provide more helpful information? just
tell me what you need. thanks a lot!

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #670783]: Different character encoding when using CMD instead of IDE

2018-07-26 Thread Launchpad Janitor
Question #670783 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/670783

Status: Open => Expired

Launchpad Janitor expired the question:
This question was expired because it remained in the 'Open' state
without activity for the last 15 days.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #670783]: Different character encoding when using CMD instead of IDE

2018-07-10 Thread Max
Question #670783 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/670783

Max posted a new comment:
Value of mail is for example:

FromSubject ReceivedSize
Lastname, Firstname Subjecttext 22:09   46 KB

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #670783]: Different character encoding when using CMD instead of IDE

2018-07-10 Thread Max
Question #670783 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/670783

Status: Answered => Open

Max is still having a problem:
I'm running Sikulix 1.1.0 on Windows 7 64bit, Java Version 8, Update
152.

Here is my code snippet with some comments:

###
type("c",KEY_CTRL) # copy selected mail subject field
mail = Env.getClipboard()
mail = mail.encode('utf-8', 'ignore').decode('utf-8')
mail = mail.split("\n") # split table titles line and subject/sender
mail = mail[1] # set var mail to the subject/sender string
mail = mail.split("\t") # split into sender and subject
sender = "sender unknown"
sender = mail[0] #sender name
sender = sender.encode('utf-8', 'ignore').decode('utf-8')
mailtext = "no text"
mailtext = mail[1] # subject text
mailtext = mailtext.encode('utf-8', 'ignore').decode('utf-8')
#switch to textbox (ticket application)
paste("Here is some text from "+sender+": "+mailtext)
###


Thank you for your help

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #670783]: Different character encoding when using CMD instead of IDE

2018-07-10 Thread RaiMan
Question #670783 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/670783

Status: Open => Answered

RaiMan proposed the following answer:
Uuups, should have read your message more carefully, sorry.

What system? What Java?

could you please paste the offending code snippet?

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #670783]: Different character encoding when using CMD instead of IDE

2018-07-10 Thread Max
Question #670783 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/670783

Max posted a new comment:
and yes: i did the .encode.decode utf-8 thing with my variable

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #670783]: Different character encoding when using CMD instead of IDE

2018-07-10 Thread Max
Question #670783 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/670783

Status: Answered => Open

Max is still having a problem:
no i‘m using „paste(myvariable)“ to paste the string into the textbox.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #670783]: Different character encoding when using CMD instead of IDE

2018-07-10 Thread RaiMan
Question #670783 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/670783

Status: Open => Answered

RaiMan proposed the following answer:
using print?

if yes: try with uprint()

this is from the sources (Lib/sikuli/Sikuli.py):

##
# some support for handling unicode and strings
#
## use instead of print if unicode strings present
# usage: uprint(s1, u1, u2, u3, s3, ...)
#
def uprint(*args):
  for e in args[:-1]:
if isinstance(e, str):
  print e,
else:
  print e.encode("utf8"),
  if isinstance(args[-1], str):
print args[-1]
  else:
print args[-1].encode("utf8")

##
# to make an utf8-encoded string from a str object
#
def unicd(s):
  return ucode(s)

def ucode(s):
  return (unicode(s, "utf8"))

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


[Sikuli-driver] [Question #670783]: Different character encoding when using CMD instead of IDE

2018-07-09 Thread Max
New question #670783 on Sikuli:
https://answers.launchpad.net/sikuli/+question/670783

Hello,

i have a sikulix script which has a different behaviour when i start it as a 
batch file with runsikulix.cmd than running it from the IDE
 .
I'm using Sikulix 1.1.0 (cant download a newer version because it is restricted 
in my companys network)

the script copys (type ctrl+c -> Env.getClipboard()) some mail text with 
special characters like "ä", "ö" or "ü" and paste it into a textbox of another 
application.
when i start my script from the sikulix IDE everything is fine.
but when i start my script from a batch file (\\xx\SikuliX\runsikulix.cmd 
-r \\\test.sikuli). the encoding of the special characters fails. The 
chacater "ä" is displayed as "ÿ".
how can i fix that?

thank you for your help!

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp