Decoding numerical and name based HTML entities
William Park
opengeometry at yahoo.ca
Thu Mar 25 13:28:43 EST 2004
Pieter Claerhout <Pieter.Claerhout at creo.com> wrote:
> Hi all,
>
> what would be the easiest way in Python to decode HTML entities to a unicode
> string? I would need a function that supports both numerical as well as name
> based HTML entities.
>
> I already did some googling, but I only found a function that decoded
> numerical ones, and this function didn't support unicode...
Dictionary "table" would be first thing I'd try, ie.
tohtml['&'] = '&'
fromhtml['&'] = '&'
--
William Park, Open Geometry Consulting, <opengeometry at yahoo.ca>
Linux solution for data processing and document management.
More information about the Python-list
mailing list