Re: unescape HTML entities

2006-11-02 Thread Frederic Rentsch
(xeb) > ì=(xec) > í=(xed) > î=(xee) > ï=(xef) > > > In [19]: > > Thanks, > Ray > > > > Frederic Rentsch wrote: > >> Rares Vernica wrote: >> >>> Hi, >>> >>> How can I unescape HTML entities like " &quo

Re: unescape HTML entities

2006-11-02 Thread Frederic Rentsch
> will not work as Python expects the file extension to be "py". > > Thanks, > Ray > > Frederic Rentsch wrote: > >> Rares Vernica wrote: >> >>> Hi, >>> >>> How can I unescape HTML entities like " "

Re: unescape HTML entities

2006-11-01 Thread Rares Vernica
252 fc ý=(xfd) # 253 fd þ=(xfe)# 254 fe é=(xe9) ê=(xea) ë=(xeb) ì=(xec) í=(xed) î=(xee) ï=(xef) In [19]: Thanks, Ray Frederic Rentsch wrote: > Rares Vernica wrote: >> Hi, >> >> How can I unescape HTML entities like " "? >> >> I know ab

Re: unescape HTML entities

2006-11-01 Thread Rares Vernica
e "py". Thanks, Ray Frederic Rentsch wrote: > Rares Vernica wrote: >> Hi, >> >> How can I unescape HTML entities like " "? >> >> I know about xml.sax.saxutils.unescape() but it only deals with "&", >> "<", and ">

Re: Unescape HTML entities

2006-10-31 Thread Klaus Alexander Seistrup
Rares Vernica wrote: > How does your code deal with ' like entities? It doesn't, it deals with named entities only. But take a look at Fredrik's example. Cheers, -- Klaus Alexander Seistrup København, Danmark, EU http://klaus.seistrup.dk/ -- http://mail.python.org/mailman/listinfo/python-l

Re: unescape HTML entities

2006-10-31 Thread Rares Vernica
Hi, How does your code deal with ' like entities? Thanks, Ray Klaus Alexander Seistrup wrote: > Rares Vernica wrote: > >> How can I unescape HTML entities like " "? >> >> I know about xml.sax.saxutils.unescape() but it only deals with >>

Re: unescape HTML entities

2006-10-30 Thread Rares Vernica
Thanks a lot for all the answers! Ray Frederic Rentsch wrote: > Rares Vernica wrote: >> Hi, >> >> How can I unescape HTML entities like " "? >> >> I know about xml.sax.saxutils.unescape() but it only deals with "&", >> "<

Re: unescape HTML entities

2006-10-29 Thread Frederic Rentsch
Rares Vernica wrote: > Hi, > > How can I unescape HTML entities like " "? > > I know about xml.sax.saxutils.unescape() but it only deals with "&", > "<", and ">". > > Also, I know about htmlentitydefs.entitydefs, but no

Re: unescape HTML entities

2006-10-28 Thread Fredrik Lundh
Rares Vernica wrote: > How can I unescape HTML entities like " "? run it through an HTML parser. or use something like this: http://effbot.org/zone/re-sub.htm#strip-html (if you want to keep elements, change the regular expression in the re.sub call to "(?s)&#?

Re: unescape HTML entities

2006-10-28 Thread Klaus Alexander Seistrup
Rares Vernica wrote: > How can I unescape HTML entities like " "? > > I know about xml.sax.saxutils.unescape() but it only deals with > "&", "<", and ">". > > Also, I know about htmlentitydefs.entitydefs, but not only

Re: unescape HTML entities

2006-10-28 Thread Jim
Rares Vernica wrote: > How can I unescape HTML entities like " "? Can I ask what you mean by "unescaping"? Do you mean converting into numeric references? Into Unicode? Jim -- http://mail.python.org/mailman/listinfo/python-list

unescape HTML entities

2006-10-28 Thread Rares Vernica
Hi, How can I unescape HTML entities like " "? I know about xml.sax.saxutils.unescape() but it only deals with "&", "<", and ">". Also, I know about htmlentitydefs.entitydefs, but not only this dictionary is the opposite of what I need,