Specify utf8 with SubtitleEdit when stripping hearing impaired

This commit is contained in:
rlaphoenix 2023-12-29 16:02:10 +00:00
parent d94d6042b7
commit 7cc7227f8c
1 changed files with 1 additions and 5 deletions

View File

@ -362,17 +362,13 @@ class Subtitle(Track):
[
executable,
"/Convert", self.path, "srt",
"/encoding:utf8",
"/overwrite",
"/RemoveTextForHI"
],
check=True,
stdout=subprocess.DEVNULL
)
# Remove UTF-8 Byte Order Marks
self.path.write_text(
self.path.read_text(encoding="utf-8-sig"),
encoding="utf8"
)
else:
sub = Subtitles(self.path)
sub.filter(