Switch back to use original binary encoding and decoding algorithms. Also ensure decode unicode string and return a unicode string when encoding
updating test