pass encoding through to open in read