Mercurial > hg > cc > cirrus_work
view lib/python/cc/percent_encode.py @ 173:10c87f5c704d
add minimal logging and don't return until finished
| author | Henry S. Thompson <ht@inf.ed.ac.uk> |
|---|---|
| date | Fri, 24 Nov 2023 19:50:12 +0000 |
| parents | 1d1bd22124c0 |
| children |
line wrap: on
line source
'''Handle unquoting of non-UTF-8 bytes by %-encoding them''' import codecs def percent_encode(ude): #print(ude.object,ude.object[ude.start:ude.end]) return (''.join('%%%X'%c for c in ude.object[ude.start:ude.end]), ude.end) codecs.register_error('percent',percent_encode)
