Environment variables should be bytes not unicode on Windows.

def __convert_env(env, encoding):
    """Environment variables should be bytes not unicode on Windows."""
    d = dict(os.environ, **(oget(env, {})))

    # workaround for Windows+Python3 environment
    if not SHOULD_NOT_ENCODE_ARGS:
        return dict((k.encode(encoding), v.encode(encoding)) for k, v in d.items())
    else:
        return d