Per https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=718931 there are certain strings that, once encoded, cannot be decoded back to the original string.
I did a review of the commit history since that old code was imported into this project, but I didn't see anything in the list that is likely to have fixed this. I haven't tested the specific case described at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=718931 with the latest code here, but I can if needed.