Unicode to HTML entities

Richard Brodie R.Brodie at rl.ac.uk
Tue May 29 11:57:14 EDT 2007


"Clodoaldo" <clodoaldo.pinto at gmail.com> wrote in message 
news:1180453921.357081.89500 at n15g2000prd.googlegroups.com...

>I was looking for a function to transform a unicode string into
>htmlentities.

>>> u'São Paulo'.encode('ascii', 'xmlcharrefreplace')
'São Paulo' 





More information about the Python-list mailing list