add utf-8 BOM to srt
This commit is contained in:
parent
cf33e530f4
commit
cc8b42ebf4
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
||||||
from __future__ import with_statement, division
|
from __future__ import with_statement, division
|
||||||
import chardet
|
import chardet
|
||||||
import re
|
import re
|
||||||
|
import codecs
|
||||||
|
|
||||||
import ox
|
import ox
|
||||||
|
|
||||||
|
@ -101,5 +102,5 @@ def encode(data):
|
||||||
s['value'].replace('\n', '\r\n').strip()
|
s['value'].replace('\n', '\r\n').strip()
|
||||||
)
|
)
|
||||||
i += 1
|
i += 1
|
||||||
return srt.encode('utf-8')
|
return codecs.BOM_UTF8 + srt.encode('utf-8')
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue