Ensure setting specified encoding