Quantcast

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
|  
Report Content as Inappropriate

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

mschoi
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.

*MainApplet.Java*
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 = {
id:'TSToolkitReal',code:'tradesign.pkitoolkit.applet.MainApplet',
width:100, height:100} ;
var parameters = {jnlp_href: getContextPath() + '/download/pkitoolkit.jnlp',
 separate_jvm:true, classloader_cache:false} ;
TSToolkitRealWrapper.prototype.stringOut=function(str)
{
  var nRet = TSToolkitReal.stringOut(str) ;
  this.OutData= TSToolkitReal.OutData;
  return nRet;
}

*HTML*
<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());
}
else
{
form.data1.value = TSToolkit.OutData;
}
}

-->
Email : [hidden email]
_______________________________________________
dev-tech-java mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-java
Loading...