Fix up encoded data to use BYTE arrays rather than strings, and remove extraneous NULL bytes from the end of some of them