but this is exactly what caused the problems as far as I remember. I'm
not a encodings expert, but does UTF-8 not support JIS characters?

Juergen

On 9/6/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
> i think that is a global default..
>
> He does want to set the encoding based on the current request.
> See my previous reply.
>
>
> johan
>
>
>
> On 9/6/06, Juergen Donnerstag <[EMAIL PROTECTED]> wrote:
> >
> you may remember that we lots of issues before we did that because
> browsers behave differently. If someone would search the mail archive
> for wicket, there were some links to articles which nicely described
> the issues associated.
>
>
> >> It is already implemented The default is UTF-8 and can be configured
> >> via
> getRequestCycleSettings().setResponseRequestEncoding(String)
> >
> >
> >I do not want to use the default. I want to set the default
> endcoding. I do not want > Wicket to set the default. I want Wicket to
> use what I set.
>
> "I don't want to use the default" => ok, set your own default
>
> "I want to set the default endcoding": ok call
> getRequestCycleSettings().setResponseRequestEncoding(String)
>
> "I do not want Wicket to set the default. I want Wicket to use what I
> set. ". Yes, call
> getRequestCycleSettings().setResponseRequestEncoding(String)
>
> What are you trying to say?
>
> Juergen
>
> On 9/6/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
> > Maybe this line:
> >
> >         // Determine encoding
> >
> >         final String encoding =
> >
> application.getRequestCycleSettings().getResponseRequestEncoding();
> >
> > in configureResponse
> >
> > should be transfered into its own protected overridable method:
> >
> > protected String getEncoding()
> > {
> >    return
> >
> application.getRequestCycleSettings().getResponseRequestEncoding();
> > }
> >
> > and then in configure response:
> >
> >          // Determine encoding
> >         final String encoding = getEncoding();
> >
> > then you can at runtime get the right encoding.
> >
> > johan
> >
> >
> >
> >
> > On 9/6/06, Imran M Yousuf < [EMAIL PROTECTED]> wrote:
> > >
> >
> > Hi dear Users,
> >
> > I have a requirement that I need to cofigure the language encoding based
> on
> > the Request Header "accept-charset". If this is not available than we have
> > our default charset. Now I am overriding the configureResponse() and NOT
> > calling super.configureResponse(). But I am using the same lines used in
> the
> > source code and please find the code used in configureResponse at the end
> of
> > the posting. The problem I am facing is that when I visit the page through
> a
> > wicket link I get the response output stream open in configureResponse,
> but
> > when I refresh the page  the output stream opens after configureResponse
> is
> > executed. As a result in the first case I get garbage character and in the
> > second case I get correct ouput. Please advice what to do. Currently I am
> > cofiguring the output stream to Shift_JIS hard codedly. If I can get this
> > flow to work then dynamically I will read the request's "accept-charset"
> and
> > set it. It is a bit urgent so quick response will be appreciated.
> >
> > Thank you.
> >
> > <code>
> >         final RequestCycle cycle = getRequestCycle();
> >         final Application application = cycle.getApplication();
> >         final Response response = cycle.getResponse();
> >
> >         // Determine encoding
> >         @SuppressWarnings("unused")
> >         final String encoding =
> >
> application.getRequestCycleSettings().getResponseRequestEncoding();
> >
> >         final String encoding1 = "text/" + getMarkupType() + "; charset="
> +
> > SHIFT_JIS;
> >
> >         // Set content type based on markup type for page
> >         ( (WebResponse) response
> > ).getHttpServletResponse().setCharacterEncoding(
> SHIFT_JIS
> > );
> >         ( (WebResponse) response
> > ).getHttpServletResponse().setContentType( encoding1 );
> >         ( (WebResponse) response
> > ).getHttpServletResponse().setHeader( ACCEPT_CHARSET,
> > SHIFT_JIS );
> >         ( (WebResponse) response
> > ).getHttpServletResponse().setHeader( ACCEPT_LANGUAGE,
> > JA_JP );
> >         // response.setContentType ("text/" + getMarkupType() + ";
> charset="
> > +
> >         // encoding);
> >
> >         // Write out an xml declaration if the markup stream and settings
> > allow
> >         final MarkupStream markupStream = findMarkupStream();
> >         if( ( markupStream != null ) && ( markupStream.getXmlDeclaration()
> > != null )
> >                 && (
> >
> application.getMarkupSettings().getStripXmlDeclarationFromOutput()
> > == false ) )
> >         {
> >             response.write( "<?xml version='1.0' encoding='" );
> >             response.write( SHIFT_JIS );
> >             response.write( "'?>" );
> >         }
> >         System.out.println (( (WebResponse) response
> > ).getHttpServletResponse().getCharacterEncoding());
> >
> >         // Set response locale from session locale
> >         response.setLocale( getSession().getLocale() );
> > </code>
> >
> > Imran
> >
> >
> -------------------------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job
> > easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> >
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> >
> > _______________________________________________
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
> >
> >
> >
> >
> -------------------------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job
> > easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> >
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> >
> > _______________________________________________
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
> >
>
> -------------------------------------------------------------------------
>
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to