Hi, i am receiveing the following exception: Caused by: java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: "!<" My scenario: Users can create space by using a URL that looks like: mydomain.com/xwiki/bin/...?space= %C3%A4%C3%B6%C3%BC%C3%9F%C2%A7%25%21%3C%3E_helloworld i then try to decode this spacename and create the space without success. String decodedspacename = URLDecoder.decode(space, "UTF-8"); How should i deal with this? thanks for your help in advance.
On 06/03/2014 05:16 AM, Daniel Ebanja wrote:
Hi, i am receiveing the following exception: Caused by: java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: "!<"
Hm, are you sure it is already decoded? I can reproduce the error message you get by decoding it twice ...
My scenario: Users can create space by using a URL that looks like: mydomain.com/xwiki/bin/...?space= %C3%A4%C3%B6%C3%BC%C3%9F%C2%A7%25%21%3C%3E_helloworld
i then try to decode this spacename and create the space without success. String decodedspacename = URLDecoder.decode(space, "UTF-8");
How should i deal with this? thanks for your help in advance. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi, I am trying to decode only once and I'm getting the exception already. String decodedspacename = URLDecoder.decode(space, "UTF-8").getpath(); Am 03.06.2014 09:50 schrieb "Clemens Klein-Robbenhaar" < [email protected]>:
On 06/03/2014 05:16 AM, Daniel Ebanja wrote:
Hi, i am receiveing the following exception: Caused by: java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: "!<"
Hm, are you sure it is already decoded? I can reproduce the error message you get by decoding it twice ...
My scenario: Users can create space by using a URL that looks like: mydomain.com/xwiki/bin/...?space= %C3%A4%C3%B6%C3%BC%C3%9F%C2%A7%25%21%3C%3E_helloworld
i then try to decode this spacename and create the space without success. String decodedspacename = URLDecoder.decode(space, "UTF-8");
How should i deal with this? thanks for your help in advance. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi, just wanted to ask if someone has an idea for me. I'll appreciate any help. Thanks Am 03.06.2014 05:16 schrieb "Daniel Ebanja" <[email protected]>:
Hi, i am receiveing the following exception: Caused by: java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: "!<"
My scenario: Users can create space by using a URL that looks like: mydomain.com/xwiki/bin/...?space= %C3%A4%C3%B6%C3%BC%C3%9F%C2%A7%25%21%3C%3E_helloworld
i then try to decode this spacename and create the space without success. String decodedspacename = URLDecoder.decode(space, "UTF-8");
How should i deal with this? thanks for your help in advance.
Hi, I think more details would be needed about what you do actually ... I tested the following groovy script in a page : {{groovy}} def space = "%C3%A4%C3%B6%C3%BC%C3%9F%C2%A7%25%21%3C%3E_helloworld" println "ENCODED ${space}" String decodedspacename = URLDecoder.decode(space, "UTF-8"); println "DECODED ${decodedspacename}" def spaceFromUrl = request.space println "From URL ENCODED ${spaceFromUrl}" String decodedspacenameFromUrl = URLDecoder.decode(space, "UTF-8"); println "From URL DECODED ${decodedspacenameFromUrl}" {{/groovy}} I pass "space=%C3%A4%C3%B6%C3%BC%C3%9F%C2%A7%25%21%3C%3E_helloworld" as a parameter to the page. The output is then : ENCODED %C3%A4%C3%B6%C3%BC%C3%9F%C2%A7%25%21%3C%3E_helloworld DECODED äöüß§%!<>_helloworld
From URL ENCODED äöüß§%!<>_helloworld From URL DECODED äöüß§%!<>_helloworld
So in this case, it works for me. If I add this additional line to my script: decodedspacenameFromUrl = URLDecoder.decode(decodedspacenameFromUrl , "UTF-8"); Then I get the exception you got, as Clemens. BR, Jeremie 2014-06-05 9:59 GMT+02:00 Daniel Ebanja <[email protected]>:
Hi, just wanted to ask if someone has an idea for me. I'll appreciate any help. Thanks Am 03.06.2014 05:16 schrieb "Daniel Ebanja" <[email protected]>:
Hi, i am receiveing the following exception: Caused by: java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: "!<"
My scenario: Users can create space by using a URL that looks like: mydomain.com/xwiki/bin/...?space= %C3%A4%C3%B6%C3%BC%C3%9F%C2%A7%25%21%3C%3E_helloworld
i then try to decode this spacename and create the space without success. String decodedspacename = URLDecoder.decode(space, "UTF-8");
How should i deal with this? thanks for your help in advance.
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi, thanks for all the help. I solved the problem. This link helped me: http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Encoding 2014-06-03 5:16 GMT+02:00 Daniel Ebanja <[email protected]>:
Hi, i am receiveing the following exception: Caused by: java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: "!<"
My scenario: Users can create space by using a URL that looks like: mydomain.com/xwiki/bin/...?space= %C3%A4%C3%B6%C3%BC%C3%9F%C2%A7%25%21%3C%3E_helloworld
i then try to decode this spacename and create the space without success. String decodedspacename = URLDecoder.decode(space, "UTF-8");
How should i deal with this? thanks for your help in advance.
-- Ebanja Daniel Informatikstudent der Hochschule Darmstadt Deutschland
participants (3)
-
Clemens Klein-Robbenhaar -
Daniel Ebanja -
Jeremie BOUSQUET