VNCScreen: problems with paste() of non-ASCII text

Asked by srainwin on 2019-07-30

When I use vncScreen,it will display Chinese randomly through functions such as paste (region, new String (text. getBytes ("UTF-8"), "UTF-8"). When I use Screen,it works well.
The java code is as follows.

public void keyboardPasteTextRegion(VNCScreen vncscreen, Region region, String text){
  try{
   vncscreen.paste(region,new String(text.getBytes("UTF-8"),"UTF-8"));
  }catch(Exception e){
   e.printStackTrace();
  }
 }

Question information

Language:
English Edit question
Status:
Expired
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2019-07-30
Last reply:
2019-08-15
RaiMan (raimund-hocke) said : #1

what version of SikuliX?

text example?

srainwin (srainwin) said : #2

The version is Sikulix1.1.3.The text is "我是中文".

Launchpad Janitor (janitor) said : #3

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