I am getting this exception while trying to generate a .PDF file from my application.
URLDecoder: Illegal hex characters in escape (%) pattern - For input string:....
Here is the stack trace
java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: "</"
at java.net.URLDecoder.decode(Unknown Source)
Here is the code
StringBuffer outBuffer = new StringBuffer();
//some values are added to outBuffer .
String pdfXmlView = URLDecoder.decode(outBuffer.toString(), "utf-8");
While trying to decode using URLDecoder.decode()
it is throwing that exception. I got the cause for the exception, it is coming because of % character in outBuffer.
If anyone knows how to solve this problem, please help me.
Thanks.