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

@@ -44,7 +44,7 @@ class EUCJPProber(MultiByteCharSetProber):
def reset(self):
MultiByteCharSetProber.reset(self)
self._mContextAnalyzer.reset()
def get_charset_name(self):
return "EUC-JP"
@@ -69,9 +69,9 @@ class EUCJPProber(MultiByteCharSetProber):
else:
self._mContextAnalyzer.feed(aBuf[i-1:i+1], charLen)
self._mDistributionAnalyzer.feed(aBuf[i-1:i+1], charLen)
self._mLastChar[0] = aBuf[aLen - 1]
if self.get_state() == constants.eDetecting:
if self._mContextAnalyzer.got_enough_data() and \
(self.get_confidence() > constants.SHORTCUT_THRESHOLD):