nwoltman / srt-to-vtt-cl

A command line tool that converts subtitle files from SubRib (.srt) format to WebVTT (.vtt) format
MIT License
95 stars 11 forks source link

Converting UTF-16 encoded files is not supported on your platform #10

Open danielbeeke opened 2 years ago

danielbeeke commented 2 years ago

I am on linux. What is needed to use it on linux? Is it some library that is needed to do this converting? And then code to implement?

nwoltman commented 2 years ago

For opening files, the code currently uses the standard codecvt library. The last time I tried that code block on anything other than Windows, it just didn't work. That was probably around 2015 though so it might work now with newer versions of GCC.

If that doesn't work, then yes, some separate library would be needed to handle UTF-16 files on Linux.

Alternatively, you could probably convert the UTF-16 files to UTF-8 using something like iconv before running them through srt-vtt.