String decoding/encoding (without the whitespace removal)