Hello,
I had a problem with attachments that contain international
characters.
I debugged a bit and found out that on request the page name
is
extracted from the page parameter. Since there is
request.setCharacterEncoding called prior to that, the
international
utf-8 page names are extracted fine.
This doesn't apply to the attachments though, since their
names are not
extracted this way. request.getPathInfo is called instead.
But setCharacterEncoding doesn't influence the encoding
getPathInfo
returns. It has to be manually encoded.
To fix, the DefaultUrlConstructor.parsePageFromURL(
HttpServletRequest
request, String encoding ) method has to be extended the
following way:
String name = request.getPathInfo();
// insert begin
if ("UTF-8".equals(encoding)) {
byte[] buf = name.getBytes("ISO-8859-1");
name = new String(buf, "UTF-8");
}
// insert end
if( name == null || name.length() <= 1 )
...
Janne, could you please update?
Best regards
Rafal
_______________________________________________
Jspwiki-users mailing list
Jspwiki-users ecyrd.com
http://ecyrd.com/cgi-bin/mailman/listinfo/jspwiki-users
a>
|