On Thursday, May 3, 2012 10:16:29 AM UTC+2, monkeyboy wrote:
>
> 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?


Well, never try to use unpaired surrogates?
(see my comment on the issue for more context) 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/ggFVAKF5cMgJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to