Closed elsnosrap closed 9 years ago
Thanks for the pull request @mitsnosrap and for bringing this issue to my attention. Could you possibly provide me with the files that were getting cut off so I can test this fix out on my machine?
Sure, I've attached a sample SRT file to a branch in my fork - https://github.com/mitsnosrap/srt-to-vtt-cl/blob/sample-srt/811357016834.swe.srt.
Just tested it and everything looks good! Please address those two little things I commented on and I'll get this merged in (I know they're pretty picky things, but it's just to keep the code base consistent).
No worries - I haven't done C/C++ programming in 5+ years, and I work with some people who can be picky. :smile:
Awesome! If you're comfortable with squashing commits, could you please squash your 3 commits into 1?
Done!
Thanks @mitsnosrap! :+1:
np - happy to contribute to an awesome project! I attempted to get this to compile on Linux this morning, but I fear my C++ skills are too rusty.
Yeah compiling on Linux is tough. It requires a recent version of Clang or GCC 5.0+ to compile on Linux, and even then I've had problems with it not finding the right .so libraries.
I was recently using this excellent tool to convert a large number of SRT caption files to VTT. A fair amount of them were detected as ANSI encoded. When using the UTF-8 conversion, the files would be truncated at the first accented character it came across. I made the following change which fixed the issue for my files.
I also added some code to print out the file's detected encoding during the conversion process.
I don't have access to a Windows machine, so I've only updated the Mac binary.