[Python-ideas] Add "htmlcharrefreplace" error handler

Antoine Pitrou solipsis at pitrou.net
Fri Jun 14 13:20:59 CEST 2013


On Fri, 14 Jun 2013 07:17:00 -0400
Alexander Belopolsky
<alexander.belopolsky at gmail.com> wrote:
> On Fri, Jun 14, 2013 at 6:11 AM, M.-A. Lemburg <mal at egenix.com> 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.

Regards

Antoine;




More information about the Python-ideas mailing list