On Mon, May 17, 2010 at 10:39 AM, Perez Manglano, Moises
<moises.per...@t-systems.es> wrote:
>
> I´ve tried this:
>
> --> response.sendRedirect ("www.coruña.es");  --> The result in the web 
> browser is: "www.coru%f1.es"

Interesting, because if you ask JavaScript to decode %F1, you get an error:
decodeURI("www.coru%F1a.es") -> error

> --> response.sendRedirect (URLEncoder.encode("www.coruña.es"), "UTF-8"); --> 
> The result in the web browser is: "www.coru%c3%b1a.es."

This would seem to be correct as it also matches JS:
encodeURI("www.coruña.es") -> www.coru%C3%B1a.es

> --> response.sendRedirect (URLEncoder.encode("www.coruña.es"), "UTF-16"); --> 
> The result in the web browser is: "www.coru%fe%ff%00%f1a.es/"
>
> In all cases the web browser (IE8, Firefox 3.6) can´t find the server.

Chrome takes the encoded URL (www.coru%C3%B1a.es) and turns it into a
request to: http://www.xn--corua-rta.es/

>
> Thanks a lot.
>
>
> -----Mensaje original-----
> De: Pid [mailto:p...@pidster.com]
> Enviado el: lunes, 17 de mayo de 2010 16:00
> Para: Tomcat Users List
> Asunto: Re: Problem using "response.sendRedirect" to redirect to URL that 
> includes "ñ" or tilde
>
> On 17/05/2010 14:43, Perez Manglano, Moises wrote:
>> Hello.
>>
>>   I´m trying to redirect to a URL that includes "ñ" using
>> "response.sendRedirect", but it parses wrongly this kind of character; I´ve 
>> tried it using "URLEncoder" and differents encondings (UTF-8,UTF-16,etc).
>
> What have you tried, and what was the exception / result?
>
>
> p
>
>> What´s the correct way to do this redirect in Tomcat version 5.5.28?
>>
>> Thanks.

-- 
Kris Schneider

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to