On Wed, Jul 1, 2009 at 2:59 PM, Bob Vawter <robertvaw...@google.com> wrote:

> > append: where is quoting the RPC_SEPARATOR_CHAR handled if it is
> contained
> > within the string?
>
> That's unnecessary, since the length of the string is known. The
> following separator character is just there to ensure that the decoder
> is synchronized with the payload and could be removed.
>

Ok, though if I am right below there will have to be a escaping/descaping
going on here.


> > I don't see where all the quoting is handled like
> > ServerSerializationStreamReader deserializeStringTable (and others) did
> > before -- various browsers have issues with different characters (current
> > Android doesn't handle any non-ASCII due to a double-decode problem), and
> > while I am not looking at the web-mode code with OOPHM (and hopefully
> > eventually an Android plugin among others) I still think this needs to be
> > solved here.  Maybe I am missing it since otherwise I don't see how
> > UnicodeEscapingTest2 could pass on all browsers.
>
> You're saying that it can't correctly write a UTF-8 string into an XHR
> or eval() JS containing UTF8 string literals?  I'll run this test on
> my Android 1.5 device.
>

The tests we did before showed that the existing RPC mechanism failed with
any non-ASCII characters on Android, because it was doing the equivalent of
UTF8encode(UTF8encode(string)) when sending from the browser to the server.

Also, WebKit in general mangles a bunch of characters so it needs additional
quoting (though more recent versions may be better).

Take a look at ClientSerializationStreamWriter.getQuotingRegex() for where
we produce a regex that matches any characters which must be quoted to
safely make it to the server.


> The only test that fails is the one that creates bad strings with low
> surrogate characters not followed by a high surrogate character.  Why
> is that tested?
>

User code might include those in strings.  The code referenced above
properly quotes them.


> > RpcRequestBuilder.java
> The constants are duplicated between client and servlet code.
>

Ok..

-- 
John A. Tamplin
Software Engineer (GWT), Google

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to