Hi, On 27 avr. 07, at 10:49, Vincent Massol wrote:
Yes this is a limitation and I assumed (probably wrongly) that servlet path wouldn't contain non ascii chars. If we have a better solution I'm all for it...
Sorry, I don't have any other idea...
Second, you don't have to fix the encoding anymore as it is not (incorrectly) decoded by the container. However, you have to decode it correctly using the java.net.URLDecoder class (and passing it you wiki encoding).
I don't understand what you're saying here. All I can say is that the existing code wasn't working at all and it now works in all cases I've tried except when the user enters non ascii chars directly in the URL. Creating pages/links using XWiki works fine.
We discussed this with Sergiu and we'd like to modify xwiki so that: - we assume that all URLs we get are URL encodings of UTF8 chars always - when we generate URLs we UTF8 encode them (and then URL encode them)
Well, you can disregard, my remark, as I did not saw that the URL is decoded correctly afterwards (by getDocumentNameFromPath).
Third, in the case where you call getPathInfo, you should put:
path = fixDecodedURI(request, request.getPathInfo());
This is what you had before but it wasn't working... That's what I fixed :)
Forget it, I only meant that in the "fail safe" case (where getRequestURI does not match context+servlet) you could fix the encoding, but there is no real reason, as this is not something to be expected... Conclusion is: just remove the fix... method which does nothing at all now... Regards, Gilles -- Gilles Sérasset GETALP-LIG BP 53 - F-38041 Grenoble Cedex 9 Phone: +33 4 76 51 43 80 Fax: +33 4 76 44 66 75