pass encoding kwarg to subprocess in platform