[PyQt] Replace HTML characters
Christoph Burgmer
chrislb at gmx.de
Wed Jan 21 12:21:53 GMT 2009
Am Wednesday, 21. January 2009 schrieb Sergio Jovani:
> I would like to ask if there is any Qt-way to converting HTML
> characters like "Á", "Ó" to Unicode characters ("Á",
> "Ó"). If there is not a Qt-way I would like to know if there is a
> Python module/function to doing that. I only found this:
> https://fisheye.toolserver.org/browse/~raw,r=5846/pywikipedia/trunk/pywikip
>edia/spellcheck.py (removeHTML function).
$ python
Python 2.5.2 (r252:60911, Jan 4 2009, 17:40:26)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import htmlentitydefs
>>> print htmlentitydefs.entitydefs['Aacute'].decode('latin1')
Á
>>>
I hope that helps.
Christoph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090121/ae2cc503/attachment.html
More information about the PyQt
mailing list