1.0.2: Fixed MKV muxing problem with UTF-8 subs
This commit is contained in:
@@ -179,7 +179,7 @@ function _subtitle(config, player, filePath, done) {
|
||||
var format = subtitle.formats[config.format] ? config.format : 'ass';
|
||||
subtitle.formats[format](data, function(err, decodedSubtitle) {
|
||||
if (err) return done(err);
|
||||
fs.writeFile(filePath + '.' + format, decodedSubtitle, done);
|
||||
fs.writeFile(filePath + '.' + format, '\ufeff' + decodedSubtitle, done);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -31,9 +31,9 @@ module.exports = function(input, done) {
|
||||
function _event(events) {
|
||||
var format = 'Layer,Start,End,Style,Name,MarginL,MarginR,MarginV,Effect,Text';
|
||||
var items = [].concat(events.event).map(function(style) {
|
||||
return _values(style.$, 'Dialogue: 0,{start},{end},{style},{name},' +
|
||||
return _values(style.$, 'Dialogue: 0,{start},{end},{style},{name},' +
|
||||
'{margin_l},{margin_r},{margin_v},{effect},{text}');
|
||||
});
|
||||
});
|
||||
return '[Events]\n' +
|
||||
'Format: ' + format + '\n' +
|
||||
items.join('\n') + '\n';
|
||||
|
||||
Reference in New Issue
Block a user