nwoltman/srt-to-vtt-cl

Different encoding is randomly detected for the same input file

sandersaares opened this issue · 2 comments

The file encoding appears to be randomly determined when processing this file: http://durian.blender.org/wp-content/content/subtitles/sintel_en.srt

The file is UTF-8, so the output in the case UTF16 is detected is, of course, gibberish.

Log displayed below:

Searching for files to convert in: .
Converting file: .\sintel_en.srt => .\sintel_en.vtt ... UTF16_LE_NOBOM text encoding detected.  done!

c:\Source\x\x\x\bin\Release>srt-vtt.exe
Searching for files to convert in: .
Converting file: .\sintel_en.srt => .\sintel_en.vtt ... No text encoding detected.  done!

c:\Source\x\x\x\bin\Release>srt-vtt.exe
Searching for files to convert in: .
Converting file: .\sintel_en.srt => .\sintel_en.vtt ... No text encoding detected.  done!

c:\Source\x\x\x\bin\Release>srt-vtt.exe
Searching for files to convert in: .
Converting file: .\sintel_en.srt => .\sintel_en.vtt ... No text encoding detected.  done!

c:\Source\x\x\x\bin\Release>srt-vtt.exe
Searching for files to convert in: .
Converting file: .\sintel_en.srt => .\sintel_en.vtt ... No text encoding detected.  done!

c:\Source\x\x\x\bin\Release>srt-vtt.exe
Searching for files to convert in: .
Converting file: .\sintel_en.srt => .\sintel_en.vtt ... UTF16_LE_NOBOM text encoding detected.  done!```

@sandersaares Thanks for finding this! I've fixed this in the code and I will be releasing a new version soon.

@sandersaares Sorry I should have mentioned this earlier; version 1.2.0 which includes this fix has been released.