Maybe it's not a bug? Try escape-ing and unescape-ing the data before you set/get. Or use ROT-13 if that isn't sufficient. That would be if it's not set up to take (largish?) binary data.