How to use type() / paste() with other encodings (cyrillic)

Asked by Andrew

i cant force sikuli to paste or type cyrillic texts on windows 7
both win-1251 and utf-8 tried

when pasting it shows questions marks or empty rectangles for symbols in textfields

when typing it shows error :
File "C:\Program Files\Sikuli X\sikuli-script.jar\Lib\sikuli\Region.py", line 160, in type
 at org.sikuli.script.Region.type_ch(Region.java:904)
 at org.sikuli.script.Region.type(Region.java:439)
 at org.python.proxies.sikuli.Region$Region$1.super__type(Unknown Source)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Cannot type character А

Help me please... Can we solve it?

Andrew

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

type does not work with other characters than the basic (ascii) characters (+ some special characters) related to the US qwerty keyboard layout.

So use paste() (supports utf-8) for the text part and type() only for the available special functional keys.

Can you help with this problem?

Provide an answer of your own, or ask Andrew for more information if necessary.

To post a message you must log in.