make encoding more explicit (and not default to None)