sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #34034
[Question #269954]: Problems with accentuated characters using nightlly build 2015-07-16
New question #269954 on Sikuli:
https://answers.launchpad.net/sikuli/+question/269954
Hi
I decided to change my previously installed Sikuli 1.1.0 that I got from www.sikulix.com at the time I installed it (according to setuplog.txt it is a nightly build from 2014-09-26) with the 1.1.0 nighlty build from 2015-07-16.
I use it in a Linux Mint 17.2 64-bit system, the language used is Brazilian Portuguese and the character encoding the system uses is UTF-8.
(output from the locale command in the shell)
LANG=pt_BR.UTF-8
LANGUAGE=pt_BR:pt:en
LC_CTYPE="pt_BR.UTF-8"
LC_NUMERIC="pt_BR.UTF-8"
LC_TIME="pt_BR.UTF-8"
LC_COLLATE="pt_BR.UTF-8"
LC_MONETARY="pt_BR.UTF-8"
LC_MESSAGES="pt_BR.UTF-8"
LC_PAPER="pt_BR.UTF-8"
LC_NAME="pt_BR.UTF-8"
LC_ADDRESS="pt_BR.UTF-8"
LC_TELEPHONE="pt_BR.UTF-8"
LC_MEASUREMENT="pt_BR.UTF-8"
LC_IDENTIFICATION="pt_BR.UTF-8"
LC_ALL=
With the version from 2014-09-26 sometimes I needed to use .encode('utf-8') with some strings or use the function unicd(), it was working fine where it was giving errors. Now some scripts are giving errors about character encoding.
With some strings I cannot use print anymore but uprint works.
When I assign a string with its encoded counterpart like this: a_var = a_var.encode('utf-8') all references to a_var still doesnt work and I need to reference it like a_var.encode( 'utf-8') in every single place.
Maybe I didn't got it right how the character encoding works in Python and something changed.
Is there any function that is suggested to be used?
I get a lot of errors like this: [error] UnicodeEncodeError ( 'ascii' codec can't encode character u'\xfa' in position 109: ordinal not in range(128) )
This is the error output when I try to print a string where I concatenated it with something like this:
a_var = a.encode('utf-8') + b.encode('utf-8')
The values was received as a response of a request using curl through subprocess (because I need to access a HTTPS address and Jython don't have the SSL protocol implemented properly, so any module that handles requests to HTTPS addresses gives errors), the response comes in JSON and is parsed using simplejson.
I don't have sure if I can reproduce that with a very simple example.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.