tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: Problem using "response.sendRedirect" to redirect to URL that includes "ñ" or tilde
Date Tue, 18 May 2010 08:18:44 GMT
Perez Manglano, Moises wrote:
> I´ve found an alternative solution for "ñ" issue; instead of redirect using "response.sendRedirect",
i´ve used the HTML META tag in this way:
> 
> <meta content="0;URL=http://www.coruña.es" http-equiv="refresh">
> 
> It redirects to the correct URL properly.
> 
Good if this resolves your current issue.
I just want to point out that it is not strictly equivalent, and less 
efficient internet-wise.
As I understand the matter, the above solution is not equivalent to a 
302 or 301 redirect, because it will not cause the browser to "remember" 
that this document is now somewhere else.  The browsers will thus 
continue to request the original URL, obtain it, and then immediately 
"refresh" this page from another URL.

And it does not solve the issue of links to such hosts, embedded in a 
page.  Maybe browsers are smart enough to figure that out though.

The link provided earlier by Konstantin
http://en.wikipedia.org/wiki/Internationalized_domain_name
points to the real solution for the time being.
(see also http://en.wikipedia.org/wiki/Punycode).

However, I personally find Punycode rather "bizarre", and I am not sure 
what software is available to make this easy to handle, in Tomcat or 
elsewhere.
Among other bizarre things, it does mean that in a URL, one has to 
encode the hostname using one method, and the rest of the URL using 
another method.  As if encoding issues were not already complicated enough.

This, and a lot of other non-USASCII encoding issues all through the 
web, point to the real need to move to a fully Unicode/UTF-8 based web 
infrastructure.  It rather puzzles me why this does not seem to be a 
major topic of discussion in forums such as this one.



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


Mime
View raw message