[Spambayes-checkins] spambayes/spambayes PyMeldLite.py,1.6,1.7
Richie Hindle
richiehindle at users.sourceforge.net
Fri Jan 31 10:32:30 EST 2003
Update of /cvsroot/spambayes/spambayes/spambayes
In directory sc8-pr-cvs1:/tmp/cvs-serv17740
Modified Files:
PyMeldLite.py
Log Message:
Fix Unicode/ASCII conversion problems with high-bit-set characters.
Index: PyMeldLite.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/PyMeldLite.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** PyMeldLite.py 28 Jan 2003 07:39:34 -0000 1.6
--- PyMeldLite.py 31 Jan 2003 18:32:27 -0000 1.7
***************
*** 489,496 ****
# fool it here.
def _mungeEntities(self, data):
! return re.sub(r'&(\w+);', r':PyMeldEntity:\1:', data)
def _unmungeEntities(self, data):
! return re.sub(r':PyMeldEntity:(\w+):', r'&\1;', data)
def feed(self, data):
--- 489,496 ----
# fool it here.
def _mungeEntities(self, data):
! return re.sub(r'&([A-Za-z0-9#]+);', r':PyMeldEntity:\1:', data)
def _unmungeEntities(self, data):
! return re.sub(r':PyMeldEntity:([A-Za-z0-9#]+):', r'&\1;', data)
def feed(self, data):
More information about the Spambayes-checkins
mailing list