Index: plugins/elements/gstfilesink.c
===================================================================
RCS file: /cvs/gstreamer/gstreamer/plugins/elements/gstfilesink.c,v
retrieving revision 1.94
diff -u -B -b -p -r1.94 gstfilesink.c
--- plugins/elements/gstfilesink.c	3 Mar 2008 18:42:04 -0000	1.94
+++ plugins/elements/gstfilesink.c	11 Mar 2008 14:38:38 -0000
@@ -34,6 +34,8 @@
 
 #include "../../gst/gst-i18n-lib.h"
 
+#include <glib/gstdio.h>
+
 #include <gst/gst.h>
 #include <stdio.h>              /* for fseeko() */
 #ifdef HAVE_STDIO_EXT_H
@@ -226,8 +228,10 @@ gst_file_sink_set_location (GstFileSink 
   g_free (sink->filename);
   g_free (sink->uri);
   if (location != NULL) {
+    /* we store the filename as we received it from the application. On Windows
+     * this should be in UTF8 */
     sink->filename = g_strdup (location);
-    sink->uri = gst_uri_construct ("file", location);
+    sink->uri = gst_uri_construct ("file", sink->filename);
   } else {
     sink->filename = NULL;
     sink->uri = NULL;
@@ -296,7 +300,7 @@ gst_file_sink_open_file (GstFileSink * s
   if (sink->filename == NULL || sink->filename[0] == '\0')
     goto no_filename;
 
-  sink->file = fopen (sink->filename, "wb");
+  sink->file = g_fopen (sink->filename, "wb");
   if (sink->file == NULL)
     goto open_failed;
 
Index: plugins/elements/gstfilesrc.c
===================================================================
RCS file: /cvs/gstreamer/gstreamer/plugins/elements/gstfilesrc.c,v
retrieving revision 1.160
diff -u -B -b -p -r1.160 gstfilesrc.c
--- plugins/elements/gstfilesrc.c	3 Mar 2008 18:42:04 -0000	1.160
+++ plugins/elements/gstfilesrc.c	11 Mar 2008 14:38:38 -0000
@@ -31,6 +31,8 @@
 #  include "config.h"
 #endif
 
+#include <glib/gstdio.h>
+
 #include <gst/gst.h>
 #include "gstfilesrc.h"
 
@@ -316,6 +318,8 @@ gst_file_src_set_location (GstFileSrc * 
     src->filename = NULL;
     src->uri = NULL;
   } else {
+    /* we store the filename as received by the application. On Windoes this
+     * should be UTF8 */
     src->filename = g_strdup (location);
     src->uri = gst_uri_construct ("file", src->filename);
   }
@@ -907,7 +911,8 @@ 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);
+  src->fd = g_open (src->filename, O_RDONLY | O_BINARY);
+
   if (src->fd < 0)
     goto open_failed;
 
