From bd49f0f959552f8295c915b9ab580a8bfd523894 Mon Sep 17 00:00:00 2001 From: wforums Date: Thu, 10 Jul 2014 12:37:30 +0200 Subject: [PATCH] Fix for .bin/RCWT file generation When not using latin1 charset, we were producing unreadable .bin files. Fixed by adding a separate case where for an RCWT under no circumstance BOM's can be added before the header. --- src/ccextractor.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ccextractor.c b/src/ccextractor.c index 5fe45e74..cb9dfcbe 100644 --- a/src/ccextractor.c +++ b/src/ccextractor.c @@ -480,6 +480,9 @@ int main(int argc, char *argv[]) break; case CCX_OF_DVDRAW: break; + case CCX_OF_RCWT: + write_subtitle_file_header(context_cc608_field_1.out); // RCWT header can't have a BOM before it, or parsing it later will not be possible. + break; default: if (ccx_options.encoding==CCX_ENC_UTF_8) // Write BOM writeraw (UTF8_BOM, sizeof (UTF8_BOM), &wbout1); @@ -520,6 +523,9 @@ int main(int argc, char *argv[]) break; case CCX_OF_DVDRAW: break; + case CCX_OF_RCWT: + write_subtitle_file_header(context_cc608_field_2.out); // RCWT header can't have a BOM before it, or parsing it later will not be possible. + break; default: if (ccx_options.encoding==CCX_ENC_UTF_8) // Write BOM writeraw (UTF8_BOM, sizeof (UTF8_BOM), &wbout2);