-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Description
If you use the following sample file with .from_buffer() you receive a MalformedFileError error.
webvtt.from_buffer(io.StringIO(caption_file_from_upload.read().decode('utf-8')), "srt")It may not be a bug because it's solved by using:
webvtt.from_buffer(io.StringIO(caption_file_from_upload.read().decode('utf-8-sig')), "srt")See https://docs.python.org/3/library/codecs.html#encodings-and-unicode
But it doesn't happen with .from_srt(), which strips out the BOM by itself.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels