sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #28627
[Question #255559]: sikuli-IED:"print u'2byte character' " is wrong.
New question #255559 on Sikuli:
https://answers.launchpad.net/sikuli/+question/255559
This is the sample code about which I worry.
--------
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
reload(sys)
import codecs
sys.stdin = codecs.getreader('utf-8')(sys.stdin)
sys.stdout = codecs.getwriter('utf-8')(sys.stdout)
print unicode("漢字","utf-8")
--------
"漢字" is 2byte character.
An error does not occur.
However, it is not displayed normally.
First, sikuli-IED is started.
First execution :
漢字
>>In the first execution, it is displayed normally.
Second execution :
æ¼¢å
>>In the second execution, a display is wrong.
Third execution :
æ¼¢åÂÂ
>>The third execution is wrong in a display further again.
Fourth execution :
æüâÃÂ¥ÃÂÃÂ
Fifth execution :
ÃÂæÃÂüÃÂâÃÂÃÂ¥ÃÂÃÂÃÂÃÂ
Sixth execution :
ÃÂÃÂÃÂæÃÂÃÂÃÂüÃÂÃÂÃÂâÃÂÃÂÃÂÃÂ¥ÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂ
7th execution :
ÃÂÃÂÃÂÃÂÃÂÃÂÃÂæÃÂÃÂÃÂÃÂÃÂÃÂÃÂüÃÂÃÂÃÂÃÂÃÂÃÂÃÂâÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂ¥ÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂ
It becomes strange rapidly.
May I know how to resolve this issue? Thanks!
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.