Odd number of non-english characters get broken in windows-ff

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Odd number of non-english characters get broken in windows-ff

I developed jnlp applet which prints out the user input.

When I put odd number of non-english characters(eg: chinese), chrome and
firefox browser prints out the last character as question mark.

input : 가
output : 가��

I checked on java console that the character is correct.

It must be bug in *communication of applet to chrome browser.*

IE prints out *correctly*.

I can resolve the issue by appending white space on applet and remove it on
java script.

Anyone has any clue on the issue?

Codes are as follows.

public class MainApplet extends JApplet implements JSInterface{//, Runnable

public int stringOut(String sData) {
OutData = sData;
return 0;


*js File*

function TSToolkitRealWrapper ()
var OutData;
var OutDataNum;
var TSToolkit = new TSToolkitRealWrapper();

var attributes = {
width:100, height:100} ;
var parameters = {jnlp_href: getContextPath() + '/download/pkitoolkit.jnlp',
 separate_jvm:true, classloader_cache:false} ;
  var nRet = TSToolkitReal.stringOut(str) ;
  this.OutData= TSToolkitReal.OutData;
  return nRet;

<SCRIPT language=javascript>
function StringOut(form)
var data = form.data.value;
var nRet = 0;
var base64Data;
nRet = TSToolkit.stringOut(data);
if (nRet > 0)
alert(nRet + " : " + TSToolkit.GetErrorMessage());
form.data1.value = TSToolkit.OutData;

Email : [hidden email]
dev-tech-java mailing list
[hidden email]