Consider the following code:
for (char c = 0; c < 0xFFFF; c++) {
printStr("" + c, (int) c);
}
private native void printStr(String str, int c) /*-{
if (str.charCodeAt(0) != c) {
console.log("c:" + c + ", code:" + str.charCodeAt(0));
}
}-*/;
A simple loop that calls a simple javascript method through JSNI. In my opinion the method should not print anything to the browser's console. Alas it prints all the characters with code 55296 - 57343. The code that it prints is always 63.
I have filed an issue here:
http://code.google.com/p/google-web-toolkit/issues/detail?id=7350. What would be the best way to avoid this problem?