Package: eric / 17.01-1

04_debian_chardet.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Changes eric to use the Debian supplied chardet instead of
of the upstream ThirdParty one.
--- a/eric/Utilities/__init__.py
+++ b/eric/Utilities/__init__.py
@@ -240,8 +240,8 @@
     if Preferences.getEditor("AdvancedEncodingDetection"):
         # Try the universal character encoding detector
         try:
-            import ThirdParty.CharDet.chardet
-            guess = ThirdParty.CharDet.chardet.detect(text)
+            import CharDet.chardet
+            guess = CharDet.chardet.detect(text)
             if guess and guess['confidence'] > 0.95 and \
                     guess['encoding'] is not None:
                 codec = guess['encoding'].lower()
@@ -423,8 +423,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)