add utf-8 BOM to srt

This commit is contained in:
j 2012-03-02 22:37:35 +01:00
parent cf33e530f4
commit cc8b42ebf4

View file

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