Glyph Lefkowitz added the comment: On Oct 8, 2013, at 3:19 PM, Augie Fackler wrote:
> No, I'm not. In Mercurial, all end-user data is OPAQUE BYTES, and must remain > that way. The PEP 383 technique for handling file names is completely capable of round-tripping exact bytes, given one encoding for both input and output. You can still handle file names this way internally in Mercurial and not risk disturbing any observable output. You do not need to change that in order to do what Victor suggests. We should get together in some other forum and discuss file-name handling though, since you can't actually round-trip "opaque bytes" through a *filesystem* and not disturb your output. > Ouch. Is there any way to write things to stderr and stdout without decoding > and hopelessly breaking user data? You can use sys.stdout.buffer.write. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue3982> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com