Charles-François Natali added the comment: > Shouldn't the surrogateescape error handler (PEP 383) prevent this?
Yes, it shoud (I just read PEP 383, I told you I didn't know anything about encoding :-). So basically, for the test failure, the issue is simply that the platform's default encoding can't encode character '\xff'. Should I simply remove the offending character from this test address? Also, let's say I wanted to test that it can be passed and returned properly, so I add '\0xff' to the adress passed to testBytesName: s.bind(b"\x00python\x00test\xff") How should I check the string returned by getsockname()? self.assertEquals(s.getsockname(), ???) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17683> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com