[Python-de] XML konforme Strings
Andreas Jung
lists at andreas-jung.com
Mon Jul 12 17:30:33 CEST 2004
Im htmlentitydefs Modul findest Du ein Mapping Entitiies -> ISO-8859-15
Zeichen. Mit einem regulären
Ausdruck, der auf Entities matchst kannst Du alle Entities suchen und über
eine Callbackmethode
via re.sub() ersetzen lassen...siehs als kleine Programmieraufgabe :-)
Andreas
--On Montag, 12. Juli 2004 17:16 Uhr +0200 Sebastian Moors <mauser at s13s.de>
wrote:
> hi !
> ich suche eine python funktion, die mir die umlaute und andere
> sonderzeichen in einem string in xml konforme entitäten übersetzt. z.b.
> sollte aus "übersetzen" "übersetzen" werden.
> gibt es sowas ?? ich kenne ähnliche funktionen aus php, doch in der
> python libary reference konnte ich nichts finden.
> mfg
> Sebastian
> --
>
> It is Texas law that when two trains meet each other at a railroad
> crossing, each shall come to a full stop, and neither shall proceed
> until the other has gone.
>
> _______________________________________________
> python-de maillist - python-de at python.net
> http://python.net/mailman/listinfo/python-de