subparse: fails to detect UTF-8 encoding
Submitted by Athanasios Oikonomou
Assigned to Reynaldo H. Verdejo Pinochet
Link to original bug (#740784)
Description
Created attachment 291594
sample srt with bom and without bom
Subparse fails to detect UTF-8 encoding when file does not contain BOM.
INFO subparse gstsubparse.c:465:convert_encoding:<subparse0>
invalid UTF-8!
But when we set GST_SUBTITLE_ENCODING to UTF-8 subtitles displayed correctly.
INFO subparse gstsubparse.c:465:convert_encoding:<subparse0>
invalid UTF-8!
LOG subparse gstsubparse.c:495:convert_encoding:<subparse0>
successfully converted 4096 characters from UTF-8 to UTF-8
The exacly same subtitle with BOM (only BOM header is the difference between those files) has no issues.
Attachment 291594, "sample srt with bom and without bom":
sample_srt.zip