ThirdParty/CharDet/chardet/charsetprober.py

changeset 12
1d8dd9706f46
parent 0
de9c2efb9d02
child 3537
7662053c3906
--- a/ThirdParty/CharDet/chardet/charsetprober.py	Fri Jan 01 16:11:36 2010 +0000
+++ b/ThirdParty/CharDet/chardet/charsetprober.py	Sat Jan 02 15:11:35 2010 +0000
@@ -26,7 +26,8 @@
 # 02110-1301  USA
 ######################### END LICENSE BLOCK #########################
 
-import constants, re
+from . import constants
+import re
 
 class CharSetProber:
     def __init__(self):
@@ -48,11 +49,11 @@
         return 0.0
 
     def filter_high_bit_only(self, aBuf):
-        aBuf = re.sub(r'([\x00-\x7F])+', ' ', aBuf)
+        aBuf = re.sub(b'([\x00-\x7F])+', b' ', aBuf)
         return aBuf
     
     def filter_without_english_letters(self, aBuf):
-        aBuf = re.sub(r'([A-Za-z])+', ' ', aBuf)
+        aBuf = re.sub(b'([A-Za-z])+', b' ', aBuf)
         return aBuf
         
     def filter_with_english_letters(self, aBuf):

eric ide

mercurial