Does gstreamer supports utf-8/unicode?

Tim-Philipp Müller t.i.m at zen.co.uk
Mon Mar 5 05:03:58 PST 2012


On Mon, 2012-03-05 at 14:56 +0200, Χρήστος Τριανταφύλλης wrote:

> i am writing a music player and i want to know if gstreamer supports
> utf-8 and unicode because i have a problem here:
> 
> info = newitem.discover_uri("file://" + path)
> UnicodeEncodeError: 'ascii' codec can't encode characters in position
> 19-25: ordinal not in range(128)
> 
> the program is written in Python

That is not how you create a valid URI from a filename.

Use gst.filename_to_uri(path) instead (on Linux/*nix systems the
filename is just a bunch of bytes in whatever encoding the filesystem
uses. On Windows, the filename must be in UTF-8 format).

Cheers 
 -Tim




More information about the gstreamer-devel mailing list