Be consistant with encode/decode.

even with empty input.