This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
If you encode and decode something and the result is different from the input, then there's obviously a bug somewhere in your code. Use a debugger to step through your code and see if it is doing what you expect it to do. You could also put System.out.println(...); statements in your code to print the value of variables at strategic places to see if the program is doing what you expect it to do.
Joined: Oct 08, 2006
Thanks for your advice, I am using the Apache Jakarta Commons Codec and the problem has disappeared.