[Bug 766214] New: filesink cannot open files with local characters on windows

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue May 10 10:06:56 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=766214

            Bug ID: 766214
           Summary: filesink cannot open files with local characters on
                    windows
    Classification: Platform
           Product: GStreamer
           Version: 1.6.3
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gstreamer (core)
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: proksa at canex.sk
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

Writing stream to file with local characters in filename fails on windows to
open file with that name. Same filename works fine on linux.

example of problem:
gst-launch-1.0 videotestsrc ! filesink location=tést.raw

fails with 
WARNING: erroneous pipeline: no element "filesink"

works fine:
gst-launch-1.0 videotestsrc ! filesink location=test.raw


Problem is in function gst_fopen in file gstfilesink.c, this function expect
its argument filename to be in UTF8, but in fact filename is in ASCII and
character é is represented as single BYTE 0xE9.

Converting filename to UTF8 before calling g_utf8_to_utf16 solves the problem.

gchar *ufilename = g_locale_to_utf8(filename, -1, NULL, NULL, NULL);
wchar_t *wfilename = g_utf8_to_utf16 (ufilename, -1, NULL, NULL, NULL);

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list