Hi,
I am using java program to decode quote-printable encoded string (mentioned
in code) which is coming in the email body. While doing so, when I test
code standalone in windows/unix machine it works fine but when I run it via
Siebel CRM which has its own JVM instance running it is throwing me below
error :
Error: org.apache.commons.codec.DecoderException: Invalid URL encoding: not
a valid digit (radix 16): 13
I found that 13 (mentioned at end of error) is decimal representation of
"\r" character, if I replace "\r\n" with "\n" considering that maybe unix
is not understanding "\r" character but I get same error just it replace 13
with 10 that means its not understanding either of them.
Code :
String str = "<meta http-equiv=3D\"Content-Type\"
content=3D\"text/html; charset=3Dutf-8\"><d=\r\n" +
"iv dir=3D\"ltr\"><div><img
src=3D\"cid:ii_k7em1jv90\" alt=3D\"image.png\" width=\r\n" +
"=3D\"520\"
height=3D\"251\"><br></div><div><br></div><div><div><img
src=3D\"cid:=\r\n" +
"ii_k7em29jm1\" alt=3D\"image.png\"
width=3D\"520\" height=3D\"381\"><br></div></di=\r\n" +
"v><div><br></div><div><div><img
src=3D\"cid:ii_k7em2x832\" alt=3D\"image.png\" =\r\n" +
"width=3D\"520\"
height=3D\"193\"><br></div></div></div>" ;
System.out.println(new
String(QuotedPrintableCodec.decodeQuotedPrintable(str.getBytes())));`
I even tried using System.lineSeparator() to mitigate platform specific
definition of line feed but it also didn't worked, What am I doing wrong
here?
Regards,
Mufaddal Rampurawala