- From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 28 Feb 2008 16:47:45 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/servlet In directory hutz:/tmp/cvs-serv31332 Modified Files: check.java Log Message: another version of the encoding check, to be aligned with the way it is decoded Index: check.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/servlet/check.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- check.java 13 Jul 2007 13:32:20 -0000 1.12 +++ check.java 28 Feb 2008 16:47:42 -0000 1.13 @@ -9,6 +9,8 @@ import java.io.IOException; +import java.net.URLEncoder; + import java.util.Enumeration; import javax.servlet.ServletConfig; @@ -41,8 +43,11 @@ { String uri = req.getHeader("Referer"); - String encodeEnc = "UTF-8"; - uri = java.net.URLEncoder.encode(uri, encodeEnc); + String encodeEnc = req.getCharacterEncoding(); + if (encodeEnc == null) { + encodeEnc = "8859_1"; + } + uri = URLEncoder.encode(uri, encodeEnc); if (uri == null) { res.setContentType("text/plain");
Received on Thursday, 28 February 2008 16:47:58 UTC