Also check for the C1 control chars

This commit is contained in:
Kovid Goyal 2018-01-05 12:35:51 +05:30
parent 0053ee6456
commit 5ac2ae511f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -653,7 +653,7 @@ class GetTranslations(Translations): # {{{
def check_for_control_chars(f): def check_for_control_chars(f):
raw = open(f, 'rb').read().decode('utf-8') raw = open(f, 'rb').read().decode('utf-8')
pat = re.compile(ur'[\0-\x08\x0b\x0c\x0e-\x1f\x7f]') pat = re.compile(ur'[\0-\x08\x0b\x0c\x0e-\x1f\x7f\x80-\x9f]')
errs = [] errs = []
for i, line in enumerate(raw.splitlines()): for i, line in enumerate(raw.splitlines()):
if pat.search(line) is not None: if pat.search(line) is not None: