Message225818
| Author | serhiy.storchaka |
|---|---|
| Recipients | Arfrever, ezio.melotti, ncoghlan, pitrou, r.david.murray, serhiy.storchaka, vstinner |
| Date | 2014-08-24.13:49:12 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1408888152.16.0.546650225121.issue18814@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
What problem is purposed to solve clean_surrogate_escapes()? Could you please provide user scenario or two?
Possible alternative implementation is:
def clean_surrogate_escapes(s):
return s.encode('utf-8', 'surrogatepass').decode('utf-8', 'replace')
It can be faster for some data (for mostly ASCII with rare surrogates it is superfast). For other data 'utf-16' can be better choice. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2014-08-24 13:49:12 | serhiy.storchaka | set | recipients: + serhiy.storchaka, ncoghlan, pitrou, vstinner, ezio.melotti, Arfrever, r.david.murray |
| 2014-08-24 13:49:12 | serhiy.storchaka | set | messageid: <1408888152.16.0.546650225121.issue18814@psf.upfronthosting.co.za> |
| 2014-08-24 13:49:12 | serhiy.storchaka | link | issue18814 messages |
| 2014-08-24 13:49:12 | serhiy.storchaka | create | |