added output encoding option (requires Avro 1.7.7)