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.
subject: problem base64 encoding the 3 hex bytes E2 80 A9