From 7cc7227f8c3a8ec0ed896940aed2ad4595bd62bf Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Fri, 29 Dec 2023 16:02:10 +0000 Subject: [PATCH] Specify utf8 with SubtitleEdit when stripping hearing impaired --- devine/core/tracks/subtitle.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/devine/core/tracks/subtitle.py b/devine/core/tracks/subtitle.py index 1edceca..a69a6e4 100644 --- a/devine/core/tracks/subtitle.py +++ b/devine/core/tracks/subtitle.py @@ -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(