forked from DRMTalks/devine
Specify utf8 with SubtitleEdit when stripping hearing impaired
This commit is contained in:
parent
d94d6042b7
commit
7cc7227f8c
|
@ -362,17 +362,13 @@ class Subtitle(Track):
|
||||||
[
|
[
|
||||||
executable,
|
executable,
|
||||||
"/Convert", self.path, "srt",
|
"/Convert", self.path, "srt",
|
||||||
|
"/encoding:utf8",
|
||||||
"/overwrite",
|
"/overwrite",
|
||||||
"/RemoveTextForHI"
|
"/RemoveTextForHI"
|
||||||
],
|
],
|
||||||
check=True,
|
check=True,
|
||||||
stdout=subprocess.DEVNULL
|
stdout=subprocess.DEVNULL
|
||||||
)
|
)
|
||||||
# Remove UTF-8 Byte Order Marks
|
|
||||||
self.path.write_text(
|
|
||||||
self.path.read_text(encoding="utf-8-sig"),
|
|
||||||
encoding="utf8"
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
sub = Subtitles(self.path)
|
sub = Subtitles(self.path)
|
||||||
sub.filter(
|
sub.filter(
|
||||||
|
|
Loading…
Reference in New Issue