Trying to sort out encodings to/from Uint8Array, not working