From 779d4b738adafb8e20ba3fa9052036c5aa69771d Mon Sep 17 00:00:00 2001 From: Jian Li Date: Sat, 29 Aug 2020 13:07:59 -0400 Subject: [PATCH] skip prompt if detected encoding is utf-8 bom --- cuefix/cuefix.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cuefix/cuefix.py b/cuefix/cuefix.py index df6ec39..2610559 100644 --- a/cuefix/cuefix.py +++ b/cuefix/cuefix.py @@ -62,9 +62,9 @@ def detect_file_encoding(self): if self.verbose: log.info('found encoding: {}'.format(c)) if self.interactive: - if c == 'ascii': + if c in ['ascii', 'utf-8-sig']: if self.verbose: - log.info('woohoo! skip prompt!') + log.info('woohoo! it is {}, skip prompt!'.format(c)) return c print(decoded) print('encoding: {}', c)