[Python-ideas] Add "htmlcharrefreplace" error handler

Stefan Drees stefan at drees.name
Fri Jun 14 13:31:43 CEST 2013


On 2013-06-14.06 13:20, Antoine Pitrou wrote:
> On Fri, 14 Jun 2013 07:17:00 -0400
> Alexander Belopolsky...wrote:
>> On Fri, Jun 14, 2013 at 6:11 AM, M.-A. Lemburg ... wrote:
>>
>>> I think you are forgetting that the output of such a codec
>>> is not necessarily always meant for sending over the wire
>>> to some browser. It may well be used for creating data which
>>> then has to be manipulated by other tools or humans.
>>>
>>
>> +1
>>
>> On top of that, even HTML that is sent over the wire to a browser may end
>> up being read by a human.  It is for a good reason that every browser has a
>> view source option more or less readily available.
>
> If you want to *read* HTML (not write it), then you certainly want the
> original Unicode characters, not the garbled HTML entities meant to
> represent them.

yes when everything just works and as a consumer, but then as the 
producers we are  :-) in the midst of a review session a debugging 
attempt or when seeking a workaround, the view ascii source level of 
about any platform comes in quite handy ...


All the best,
Stefan.


More information about the Python-ideas mailing list