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.
This commit is contained in:
wforums 2014-07-10 12:37:30 +02:00
parent 63d3071233
commit bd49f0f959

View File

@ -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);