GNOME Bugzilla – Bug 555257
Doesn't display srt subtitles saved with BOM
Last modified: 2008-10-10 17:12:18 UTC
Please describe the problem: Subtitles in a UTF-8 encoded .srt file with a byte-order mark are not shown by Totem. Steps to reproduce: 1. Enable automatic loading of subtitles in Totem. 2. Load a working subtitle file into Gnome Subtitles. 2. Save the subtitles using the same file name, choose UTF-8 for encoding. 3. In Totem, open the video associated with the subtitle file. Actual results: Totem does not display the subtitles on top of the video. Expected results: Totem to show the subtitles on top of the video. Does this happen every time? Yes. Other information: I initially filed this against Gnome Subtitles (bug 554721).
UTF-8 files should not have a BOM at the beginning AFAIK, it's only for UTF-16 and UTF-32. Nonetheless, could you attach such subtitle file to this bug?
Created attachment 120344 [details] Subrip subtitle (one line of text); UTF-8 with BOM
2008-10-10 Sebastian Dröge <sebastian.droege@collabora.co.uk> * gst/subparse/gstsubparse.c: (gst_sub_parse_data_format_autodetect), (handle_buffer), (gst_sub_parse_change_state): * gst/subparse/gstsubparse.h: * tests/check/elements/subparse.c: (GST_START_TEST): Add support for subtitle files with UTF-8 BOM at the beginning by simple stripping it from the first line before passing it to any parsing code. Fixes bug #555257 and playback of files created by Gnome Subtitles.