return useful information when a string cannot be encoded
added some more information about how rwrapper uses private variables