Also use the encoding switch when reading from STDIN