How to encode html and xml tag datas with standard python modules ?
Serge Orlov
Serge.Orlov at gmail.com
Thu May 11 10:40:21 EDT 2006
DurumDara wrote:
> Hi !
>
> I probed this function, but that is not encode the hungarian specific
> characters, like áéíóüóöoúüu: so the chars above chr(127).
> Have the python a function that can encode these chars too, like in Zope ?
>
The word encode is ambiguous. What do you mean? The example Fredrik
gave to you does encode:
>>> import cgi
>>> cgi.escape(u"áéíóüóöoúüu").encode("ascii", "xmlcharrefreplace")
'áéíóüóöőúüű'
More information about the Python-list
mailing list