converting html escape sequences to unicode characters

Craig Ringer craig at
Fri Dec 10 09:15:12 CET 2004

On Fri, 2004-12-10 at 16:09, Craig Ringer wrote:
> On Fri, 2004-12-10 at 08:36, harrelson wrote:
> > I have a list of about 2500 html escape sequences (decimal) that I need
> > to convert to utf-8.  Stuff like:
> I'm pretty sure this somewhat horrifying code does it, but is probably
> an example of what not to do:

It is. Sorry. I initially misread Kent Johnson's post. He just used
'unichr()'. Colour me an idiot. If you ever need to know the hard way to
build a unicode character...

Craig Ringer

More information about the Python-list mailing list