Hi ! I probed this function, but that is not encode the hungarian specific characters, like áéíóüóöőúüű: so the chars above chr(127). Have the python a function that can encode these chars too, like in Zope ?
Thanx for help: dd Fredrik Lundh írta: > DurumDara wrote: > > >> Have the python standard mod. lib. a html/xml encoder functions/procedures ? >> > > you can use > > cgi.escape(s) # escapes < > & > > for CDATA sections, and > > cgi.escape(s, True) # escapes < > & " > > for attributes. > > to output ASCII, use > > cgi.escape(s).encode("ascii", "xmlcharrefreplace") > cgi.escape(s, True).encode("ascii", "xmlcharrefreplace") > > >> if b<32 or b>127 or c in ['<','>','"',';','&','@','%','#']: >> c="&#%03d;"%b >> > > that's a rather odd set of reserved characters... > > </F> > > > > -- http://mail.python.org/mailman/listinfo/python-list