[Python-ideas] Lossless bulletproof conversion to unicode (backslashing)

anatoly techtonik techtonik at gmail.com
Fri May 29 10:10:53 CEST 2015


On Wed, May 27, 2015 at 6:28 PM, Paul Moore <p.f.moore at gmail.com> wrote:
> On 26 May 2015 at 19:30, anatoly techtonik <techtonik at gmail.com> wrote:
>> In real world you have to deal with broken and invalid
>> output and UnicodeDecode crashes is not an option.
>> The unicode() constructor proposes two options to
>> deal with invalid output:
>>
>> 1. ignore  - meaning skip and corrupt the data
>> 2. replace  - just corrupt the data
>
> There are other error handlers, specifically surrogateescape is
> designed for this use. Only in Python 3.x admittedly, but this list is
> about future versions of Python, so that's what matters here.

Forwarded message to python-list and now I have a thread
schizophrenia. I read it like python-list is also about Python 3 and
got really mad about that. I was a click away from sending me
into the ban list again. =)


Ok. Closing thread in python-idea. This needs to be reopened
when the thread is about Python 4 (which should be all about
improving user experience and assessment of the results).

-- 
anatoly t.


More information about the Python-ideas mailing list