Author vstinner
Recipients benjamin.peterson, gz, pitrou, poolie, r.david.murray, vila, vstinner
Date 2011-12-21.20:04:43
SpamBayes Score 3.12474e-09
Marked as misclassified No
Message-id <1324497884.3.0.0325051788672.issue13643@psf.upfronthosting.co.za>
In-reply-to
Content
> it will still be passing values that can't be
> interpreted by other processes as you highlighed earlier.

On UNIX, data going outside Python has be be encoded: you pass byte strings, not directly Unicode. Surrogates are encoded back to original bytes.

Example:

>>> b'a\xff'.decode('ascii', 'surrogateescape')
'a\udcff'
>>> b'a\xff'.decode('ascii', 'surrogateescape').encode('ascii', 'surrogateescape')
b'a\xff'
History
Date User Action Args
2011-12-21 20:04:44vstinnersetrecipients: + vstinner, pitrou, vila, benjamin.peterson, r.david.murray, gz, poolie
2011-12-21 20:04:44vstinnersetmessageid: <1324497884.3.0.0325051788672.issue13643@psf.upfronthosting.co.za>
2011-12-21 20:04:43vstinnerlinkissue13643 messages
2011-12-21 20:04:43vstinnercreate