This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Arfrever, ezio.melotti, lemburg, ncoghlan, pitrou, r.david.murray, serhiy.storchaka, vstinner
Date 2015-03-17.11:13:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1426590808.43.0.598474585118.issue18814@psf.upfronthosting.co.za>
In-reply-to
Content
I uploaded the patch just before your comment Nick.

Here is updated patch. Functions are renamed as Nick suggested, added two more functions: decompose_astrals() and compose_surrogate_pairs(). They are mainly for example here, they can be committed in other issue.

I hesitate about the rehandle_surrogatepass name. This function handles surrogates than can be created not only with the "surrogatepass" handler, but also with different ways, e.g. with the "surrogateescape" handler, with chr(), handle_astral() or decompose_astrals(). Actually it checks that the string is valid Unicode (not containing surrogates) and handle errors if found with specified error handler.

May be there is a time for wider discussion on Python-Dev. I especially want to hear opinions of Ezio and Martin.
History
Date User Action Args
2015-03-17 11:13:28serhiy.storchakasetrecipients: + serhiy.storchaka, lemburg, ncoghlan, pitrou, vstinner, ezio.melotti, Arfrever, r.david.murray
2015-03-17 11:13:28serhiy.storchakasetmessageid: <1426590808.43.0.598474585118.issue18814@psf.upfronthosting.co.za>
2015-03-17 11:13:28serhiy.storchakalinkissue18814 messages
2015-03-17 11:13:28serhiy.storchakacreate