Sun, 21 Jan 2018 12:34:07 +0100
Extended the search for a 'coding' statement from the first two lines to the first 5 lines because some scripts include empty lines between the she-bang line and the coding line.
Utilities/__init__.py | file | annotate | diff | comparison | revisions |
--- a/Utilities/__init__.py Sun Jan 21 12:32:31 2018 +0100 +++ b/Utilities/__init__.py Sun Jan 21 12:34:07 2018 +0100 @@ -81,11 +81,11 @@ configDir = None codingBytes_regexps = [ - (2, re.compile(br'''coding[:=]\s*([-\w_.]+)''')), + (5, re.compile(br'''coding[:=]\s*([-\w_.]+)''')), (1, re.compile(br'''<\?xml.*\bencoding\s*=\s*['"]([-\w_.]+)['"]\?>''')), ] coding_regexps = [ - (2, re.compile(r'''coding[:=]\s*([-\w_.]+)''')), + (5, re.compile(r'''coding[:=]\s*([-\w_.]+)''')), (1, re.compile(r'''<\?xml.*\bencoding\s*=\s*['"]([-\w_.]+)['"]\?>''')), ]