eric6/Utilities/__init__.py

changeset 8258
82b608e352ec
parent 8243
cc717c2ae956
child 8260
2161475d9639
--- a/eric6/Utilities/__init__.py	Tue Apr 20 19:47:39 2021 +0200
+++ b/eric6/Utilities/__init__.py	Wed Apr 21 17:56:12 2021 +0200
@@ -243,8 +243,8 @@
     if Preferences.getEditor("AdvancedEncodingDetection"):
         # Try the universal character encoding detector
         try:
-            import ThirdParty.CharDet.chardet
-            guess = ThirdParty.CharDet.chardet.detect(text)
+            import chardet
+            guess = chardet.detect(text)
             if (
                 guess and
                 guess['confidence'] > 0.95 and
@@ -437,8 +437,8 @@
     
     # try codec detection
     try:
-        import ThirdParty.CharDet.chardet
-        guess = ThirdParty.CharDet.chardet.detect(buffer)
+        import chardet
+        guess = chardet.detect(buffer)
         if guess and guess['encoding'] is not None:
             codec = guess['encoding'].lower()
             return str(buffer, encoding=codec)

eric ide

mercurial