mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2024-12-24 20:01:42 +00:00
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:
parent
63d3071233
commit
bd49f0f959
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user