Make encoding optional.