Fixed an issue related to the use of re.LOCALE. maintenance

Wed, 22 Feb 2017 19:25:07 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 22 Feb 2017 19:25:07 +0100
branch
maintenance
changeset 5547
00e8452972f0
parent 5531
e7fff6f1ff19
child 5565
8782cf2b1f6a

Fixed an issue related to the use of re.LOCALE.
(grafted from 971f5ab7429ca314d584d99efc4949bdb9a1bf88)

UI/FindFileDialog.py file | annotate | diff | comparison | revisions
--- a/UI/FindFileDialog.py	Sun Feb 19 15:22:42 2017 +0100
+++ b/UI/FindFileDialog.py	Wed Feb 22 19:25:07 2017 +0100
@@ -11,6 +11,7 @@
 
 import os
 import re
+import sys
 
 from PyQt5.QtCore import pyqtSignal, Qt, pyqtSlot
 from PyQt5.QtGui import QCursor
@@ -370,7 +371,10 @@
             txt = re.escape(ct)
         if wo:
             txt = "\\b{0}\\b".format(txt)
-        flags = re.UNICODE | re.LOCALE
+        if sys.version_info[0] == 2:
+            flags = re.UNICODE | re.LOCALE
+        else: 
+            flags = re.UNICODE
         if not cs:
             flags |= re.IGNORECASE
         try:

eric ide

mercurial