After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 456788 - [subparse] can't handle UTF-16 charset encoded subtitle.
[subparse] can't handle UTF-16 charset encoded subtitle.
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other All
: Normal normal
: 0.10.22
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-07-14 05:29 UTC by Young-Ho Cha
Modified: 2008-10-13 08:58 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description Young-Ho Cha 2007-07-14 05:29:08 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:
Comment 1 Young-Ho Cha 2007-07-14 05:32:15 UTC
Sorry, I did submit report form with invalid information.

Valid information is..

Expected results:
Play video with subtitle

Actual results:
Play video file only
Comment 2 Tim-Philipp Müller 2007-07-14 11:25:32 UTC
Where do subtitle files like this come from? Do those files not even have a BOM marker at the beginning?
Comment 3 Young-Ho Cha 2007-07-14 14:26:17 UTC
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



Comment 4 Sebastian Dröge (slomo) 2008-10-13 08:58:21 UTC
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.