GNOME Bugzilla – Bug 456788
[subparse] can't handle UTF-16 charset encoded subtitle.
Last modified: 2008-10-13 08:58:21 UTC
Please describe the problem: Some of subtitle file has encoded UTF-16, but gst_subparse_type_find() function is not aware. Steps to reproduce: 1. convert subtitle file to UTF-16 encoding via iconv 2. play video file with totem 3. Actual results: Play video with subtitle Expected results: Play video file only Does this happen every time? Yes Other information:
Sorry, I did submit report form with invalid information. Valid information is.. Expected results: Play video with subtitle Actual results: Play video file only
Where do subtitle files like this come from? Do those files not even have a BOM marker at the beginning?
Here is subtitle creater blog(but korean only.) http://blog.naver.com/windslime and Blog owner seems to use a program called "Caption Creator 4 SMI edition" to make subtitle. You can get "Caption Creator 4 SMI edition" from http://php.chol.com/~jkhda456/zb/bbs/zboard.php?id=ccDownload and It can save subtitle file as "Unicode" and it seems to save a subtitle file as "utf-16le" with BOM. and You can download subtitle encoded utf-16 http://mfiles.naver.net/c316f72e38600bbc5d/data19/2007/7/9/2/setoyome_14-windslime.rar
2008-10-13 Sebastian Dröge <sebastian.droege@collabora.co.uk> * gst/subparse/Makefile.am: * gst/subparse/gstsubparse.c: (gst_sub_parse_dispose), (gst_sub_parse_class_init), (gst_sub_parse_init), (gst_convert_to_utf8), (detect_encoding), (convert_encoding), (get_next_line), (gst_sub_parse_data_format_autodetect), (feed_textbuf), (handle_buffer), (gst_sub_parse_change_state), (gst_subparse_type_find): * gst/subparse/gstsubparse.h: Add support for UTF16/UTF32 subtitles as long as the first bytes of the first buffer contain the BOM. This also adds support for other encodings that allow NUL bytes via the encoding property. Fixes bugs #552237 and #456788.