Martin Panter added the comment: Here is a tested illustration of how I would suggest to manually handle encoding with check_output():
>>> text_input = "©" >>> args = ("iconv", "--from-code", "ISO_8859-1", "--to-code", "UTF-8") >>> bytes_output = check_output(args, input=text_input.encode("iso-8859-1")) >>> bytes_output b'\xc2\xa9' >>> bytes_output.decode("utf-8") '©' If you wanted actual universal newline translation (which is more than plain text encoding), it would be more complicated, but still possible. But I am not hugely against adding new “encoding” and “errors” parameters. The reasons against are that I don’t see it as necessary, and there are already a lot of subprocess-specific options to wade through. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6135> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com