add option to always assume specified encoding