Fix subprocess encoding