fix: Handle SRT files with BOM by using utf-8-sig encoding
This commit is contained in:
parent
50d8e6d261
commit
a8c72b3efa
1 changed files with 1 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
import sys
|
||||
|
||||
def parse_srt(filename):
|
||||
with open(filename, 'r', encoding='utf-8') as f:
|
||||
with open(filename, 'r', encoding='utf-8-sig') as f:
|
||||
content = f.read().strip()
|
||||
blocks = content.split('\n\n')
|
||||
entries = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue