Sync to trunk.

This commit is contained in:
John Schember 2011-02-12 09:09:07 -05:00
commit 9c247a8953

View File

@ -12,6 +12,8 @@ def clean_ascii_chars(txt, charlist=None):
Remove ASCII control chars: 0 to 8 and 11, 12, 14-31 by default
This is all control chars except \\t,\\n and \\r
'''
if not txt:
return ''
global _ascii_pat
if _ascii_pat is None:
chars = list(range(8)) + [0x0B, 0x0C] + list(range(0x0E, 0x1F))