code cleanup

This commit is contained in:
Bernardo Damele
2011-05-05 08:50:18 +00:00
parent b12aa8a56f
commit eea96c5b8d
12 changed files with 27 additions and 27 deletions

View File

@@ -31,10 +31,10 @@ import constants, re
class CharSetProber:
def __init__(self):
pass
def reset(self):
self._mState = constants.eDetecting
def get_charset_name(self):
return None
@@ -50,11 +50,11 @@ class CharSetProber:
def filter_high_bit_only(self, aBuf):
aBuf = re.sub(r'([\x00-\x7F])+', ' ', aBuf)
return aBuf
def filter_without_english_letters(self, aBuf):
aBuf = re.sub(r'([A-Za-z])+', ' ', aBuf)
return aBuf
def filter_with_english_letters(self, aBuf):
# TODO
return aBuf