[issue25269] Add method to detect if a string contains surrogates

2015-09-29 Thread STINNER Victor
Changes by STINNER Victor : -- components: +Unicode nosy: +ezio.melotti, haypo ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue25269] Add method to detect if a string contains surrogates

2015-09-29 Thread R. David Murray
New submission from R. David Murray: Because surrogates are in several contexts used to "smuggle" bytes through string APIs using surrogateescape, it is very useful to be able to determine if a given string contains surrogates. The email package, for example, uses different logic to handle st