diff -u -p -r1.77 gstfilesink.c
--- plugins/elements/gstfilesink.c	16 Jun 2006 16:28:37 -0000	1.77
+++ plugins/elements/gstfilesink.c	10 Aug 2006 15:52:38 -0000
@@ -184,8 +184,11 @@ gst_file_sink_set_location (GstFileSink 
   g_free (sink->filename);
   g_free (sink->uri);
   if (location != NULL) {
-    sink->filename = g_strdup (location);
-    sink->uri = gst_uri_construct ("file", location);
+    if (g_utf8_validate (location, -1, NULL))
+      sink->filename = g_strdup (location);
+    else
+     sink->filename = g_locale_to_utf8 (location, -1, NULL, NULL, NULL);
+    sink->uri = gst_uri_construct ("file", sink->filename);
   } else {
     sink->filename = NULL;
     sink->uri = NULL;
@@ -228,11 +231,15 @@ gst_file_sink_get_property (GObject * ob
 static gboolean
 gst_file_sink_open_file (GstFileSink * sink)
 {
+  char *fs_filename;
+
   /* open the file */
   if (sink->filename == NULL || sink->filename[0] == '\0')
     goto no_filename;
 
-  sink->file = fopen (sink->filename, "wb");
+  fs_filename = g_filename_from_utf8 (sink->filename, -1, NULL, NULL, NULL);
+  sink->file = fopen (fs_filename, "wb");
+  g_free (fs_filename);
   if (sink->file == NULL)
     goto open_failed;
 
diff -u -p -r1.140 gstfilesrc.c
--- plugins/elements/gstfilesrc.c	27 Jul 2006 12:39:42 -0000	1.140
+++ plugins/elements/gstfilesrc.c	10 Aug 2006 15:52:41 -0000
@@ -320,7 +320,10 @@ gst_file_src_set_location (GstFileSrc * 
     src->filename = NULL;
     src->uri = NULL;
   } else {
-    src->filename = g_strdup (location);
+    if (g_utf8_validate (location, -1, NULL))
+      src->filename = g_strdup (location);
+    else
+     src->filename = g_locale_to_utf8 (location, -1, NULL, NULL, NULL);
     src->uri = gst_uri_construct ("file", src->filename);
   }
   g_object_notify (G_OBJECT (src), "location");
@@ -899,6 +902,7 @@ gst_file_src_start (GstBaseSrc * basesrc
 {
   GstFileSrc *src = GST_FILE_SRC (basesrc);
   struct stat stat_results;
+  char *fs_filename;
 
   if (src->filename == NULL || src->filename[0] == '\0')
     goto no_filename;
@@ -906,7 +910,9 @@ gst_file_src_start (GstBaseSrc * basesrc
   GST_INFO_OBJECT (src, "opening file %s", src->filename);
 
   /* open the file */
-  src->fd = open (src->filename, O_RDONLY | O_BINARY);
+  fs_filename = g_filename_from_utf8 (src->filename, -1, NULL, NULL, NULL);
+  src->fd = open (fs_filename, O_RDONLY | O_BINARY);
+  g_free (fs_filename);
   if (src->fd < 0)
     goto open_failed;
 
