Sushi icon indicating copy to clipboard operation
Sushi copied to clipboard

Sushi changing SRT File Encoding

Open Asinin3 opened this issue 7 years ago • 2 comments

When I ran Sushi with SRT subtitles that were encoded as UTF-8-BOM Sushi saved the output subtitles as simply UTF-8. When trying to open this file in Aegisub it gave the following error: image This is easily fixed by changing the encoding of the file. Weirdly enough, this only seems to happen on SRT subtitles, when I ran Sushi on .ass subtitles which used UTF-8-BOM it did not change the encoding. Here's the original and sushi output if needed: sushi.zip

Asinin3 avatar Jul 11 '18 03:07 Asinin3

As an update, this doesn't happen on all SRT files, only some. I'm not sure what's causing it to happen with the file I provided though.

Asinin3 avatar Nov 01 '18 08:11 Asinin3

According to subs.py your first comment is in line with the source. It writes utf-8 when dealing with srt, and utf-8-sig when dealing with ass. I will open up a pull request to change that behavior.

As an update, this doesn't happen on all SRT files, only some.

Interesting... can you please provide files to reproduce?

averms avatar Nov 04 '18 07:11 averms