how can we made that reliable ??
Because utf-8 can be 8 bits or 16 or i think 24 per char. Depending on what it really needs..

What does for example a JSP do it its servlet generated form if you use UTF-8??
Or doesn't he set anything?

johan

Jan Bares wrote:
I see what you mean. The encoding of the response could be
wrong in case of REDIRECT_TO_BUFFER and the buffer to be
returned, correct? I didn't find any other case, where it is
wrong. Did you?
    

No, this seems to be the only case.

And there is another bug with this piece of code. In the case of utf-8
content type the bufferedResponse.getContentLength() returns number of utf-8
characters (i guess) but it should return number of bytes. In other words,
you set the content length to smaller size than you actualy write with
writer.write(bufferedResponse.toString());

Regards, Jan

  
if (bufferedResponse != null)
{
// got a buffered response; now write it
PrintWriter writer = servletResponse.getWriter();

servletResponse.setContentLength(bufferedResponse.getContentLength());

servletResponse.setContentType(bufferedResponse.getContentType());
    





-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

  

Reply via email to