Stupid string encode and decode
SLightly better but still broken byte encode/decode