mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Also check for the C1 control chars
This commit is contained in:
parent
0053ee6456
commit
5ac2ae511f
@ -653,7 +653,7 @@ class GetTranslations(Translations): # {{{
|
||||
|
||||
def check_for_control_chars(f):
|
||||
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 = []
|
||||
for i, line in enumerate(raw.splitlines()):
|
||||
if pat.search(line) is not None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user