Index: src/backend/bacon-video-widget-gst-0.10.c
===================================================================
RCS file: /cvs/gnome/totem/src/backend/bacon-video-widget-gst-0.10.c,v
retrieving revision 1.70
diff -u -r1.70 bacon-video-widget-gst-0.10.c
--- src/backend/bacon-video-widget-gst-0.10.c	14 May 2006 10:32:38 -0000	1.70
+++ src/backend/bacon-video-widget-gst-0.10.c	20 May 2006 11:27:19 -0000
@@ -2638,6 +2638,19 @@
   g_object_set (bvw->priv->play, "subtitle-font-desc", font, NULL);
 }
 
+void
+bacon_video_widget_set_subtitle_encoding (BaconVideoWidget *bvw,
+				const gchar *encoding)
+{
+  g_return_if_fail (bvw != NULL);
+  g_return_if_fail (BACON_IS_VIDEO_WIDGET (bvw));
+  g_return_if_fail (GST_IS_ELEMENT (bvw->priv->play));
+
+  if (!g_object_class_find_property (G_OBJECT_GET_CLASS (bvw->priv->play), "subtitle-encoding"))
+    return;
+  g_object_set (bvw->priv->play, "subtitle-encoding", encoding, NULL);
+}
+
 gboolean
 bacon_video_widget_can_set_volume (BaconVideoWidget * bvw)
 {
Index: src/backend/bacon-video-widget-xine.c
===================================================================
RCS file: /cvs/gnome/totem/src/backend/bacon-video-widget-xine.c,v
retrieving revision 1.229
diff -u -r1.229 bacon-video-widget-xine.c
--- src/backend/bacon-video-widget-xine.c	28 Apr 2006 10:45:07 -0000	1.229
+++ src/backend/bacon-video-widget-xine.c	20 May 2006 11:27:20 -0000
@@ -3059,6 +3059,20 @@
 }
 
 void
+bacon_video_widget_set_subtitle_encoding (BaconVideoWidget *bvw, const char *encoding)
+{
+	xine_cfg_entry_t entry;
+	g_return_val_if_fail (bvw != NULL, 0);
+	g_return_val_if_fail (BACON_IS_VIDEO_WIDGET (bvw), 0);
+	g_return_val_if_fail (bvw->priv->xine != NULL, 0);
+
+	bvw_config_helper_string(bvw->priv->xine, 
+			"subtitles.separate.src_encoding", encoding, &entry);
+	entry.str_value = (char *)encoding;
+	xine_config_update_entry(bvw->priv->xine, &entry);
+}
+
+void
 bacon_video_widget_set_video_device (BaconVideoWidget *bvw, const char *path)
 {
 	xine_cfg_entry_t entry;
Index: src/backend/bacon-video-widget.h
===================================================================
RCS file: /cvs/gnome/totem/src/backend/bacon-video-widget.h,v
retrieving revision 1.67
diff -u -r1.67 bacon-video-widget.h
--- src/backend/bacon-video-widget.h	28 Apr 2006 10:45:07 -0000	1.67
+++ src/backend/bacon-video-widget.h	20 May 2006 11:27:20 -0000
@@ -178,6 +178,8 @@
 						  MediaType type);
 void bacon_video_widget_set_subtitle_font	 (BaconVideoWidget *bvw,
 						  const char *font);
+void bacon_video_widget_set_subtitle_encoding (BaconVideoWidget *bvw,
+						  const char *encoding);
 
 /* Video devices */
 void bacon_video_widget_set_video_device	 (BaconVideoWidget *bvw,
