You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@turbine.apache.org by "Thomas Vandahl (JIRA)" <ji...@apache.org> on 2008/03/27 12:19:25 UTC
[jira] Resolved: (TRB-43) URL info path does decode correctly UTF-8
caracters
[ https://issues.apache.org/jira/browse/TRB-43?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Vandahl resolved TRB-43.
-------------------------------
Resolution: Fixed
Fix Version/s: Core 2.3.3
Assignee: Thomas Vandahl
This should no longer be an issue. The parser in 2.3.3-dev uses the encoding of the request or ISO-8859-1 if not specified. The problem is that although the W3C-recommendation is UTF-8, the browsers don't care. If the browser gets ISO-encoded content, it will provide requests and URLs in ISO-encoding. If the content is UTF-8, the request will be UTF-8-encoded. The default is ISO, unfortunately, at least for Firefox. Tomcat provides the "useBodyEncodingForURI" attribute for its connectors for this very reason (see http://tomcat.apache.org/tomcat-5.5-doc/config/http.html).
> URL info path does decode correctly UTF-8 caracters
> ---------------------------------------------------
>
> Key: TRB-43
> URL: https://issues.apache.org/jira/browse/TRB-43
> Project: Turbine
> Issue Type: Bug
> Components: Core
> Reporter: Thomas Ung
> Assignee: Thomas Vandahl
> Priority: Minor
> Fix For: Core 2.3.3
>
>
> the DefaultParameterParser does not decode UTF-8 caracters correctly
> For instance when path info is the following: /screen/Download/webfile/Report%C3%A9%C3%A7%C3%A8%C3%A9%27.txt
> I got => org.apache.turbine.util.parser.DefaultParameterParser - Key: webfile -> Reportéçèé'.txt
> instead of => /screen/Download/webfile/Reportéçèé'.txt
> given by the followed piece of code: URLDecoder.decode( data.getRequest().getRequestURI(),"UTF-8")
> I think that we just need to replace in DefaultParameterParser in method setRequest(HttpServletRequest request)
> +paramName = URLDecoder.decode(st.nextToken(),"UTF-8"); // UTF-8 is recommended by W3C what ever the application encoding. it should not depend on input.encoding parameter
> -paramName = URLDecoder.decode(st.nextToken()); // this is depreciated
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.