On 25 mar, 13:44, denis56 <[email protected]> wrote:
> Appreciate your recommendations.
>
> Regarding encoding, I have tried it out with changing it to UTF-8 and
> it works as expected, the page does not fit to the overall project
> infrastructure though since other pages use ISO-8859-1.
> Just wondering, how come when encoding of all pages is set at
> ISO-8859-1, everything that is not an RPC response is displayed
> wrongly, while data coming from PRC is being properly displayed?
RPC responses are sent over the wire with an explicit charset=utf-8
Content-Type parameter and it's the browser's responsability to decode
the payload into a string (of characters / code points). On the other
hand, if you page is encoded in latin-1 (charset=iso-8859-1 in Content-
Type or <meta charset=iso-8859-1> in the content), the compiled GWT
code will be loaded as if it were encoded in latin-1 whereas the GWT
compiler produces utf-8.
(it's actually a bit more complex, depending on whether you explicitly
set a charset=utf-8 parameter in the Content-Type of the *.nocache.*
files otherwise, IIRC, when loading an iframe, there might be encoding
sniffing (looking for a <meta charset> and/or examining the bytes to
try to detect the encoding, falling back to the "parent document"
encoding)
By sticking to UTF-8, you can be assured that you won't have any
problem.
I believe you could also just run the output from GWT through iconv or
any other encoding convert to turn UTF-8 into latin-1 (replacing
characters that cannot be encoded in latin-1 with javacript's \uNNNN
escapes), but it's easier and less error-prone to just use UTF-8.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---