def read_as_utf8(fileno):
    fp = io.open(fileno, mode='r', encoding='utf-8', closefd=False)
print(fp.read())
fp.close()
gpg = subprocess.Popen(['gpg', '--version'], stdout=subprocess.PIPE)
read_as_utf8(gpg.stdout.fileno())
normal_file = open('loremipsum.txt', 'rb')
read_as_utf8(normal_file.fileno())
pipe_r, pipe_w = os.pipe()
os.write(pipe_w, 'Lorem ipsum.'.encode('utf-8'))
os.close(pipe_w)
read_as_utf8(pipe_r)
os.close(pipe_r)
Оберните открытый поток с помощью io.TextIOWrapper