i am using discoverer to get the tags from a file that why i am using<br> newitem.discover_uri("file://" + path)<br><br>it is the same to use the one you recommended?<br><br><div class="gmail_quote">2012/3/5 Tim-Philipp Müller <span dir="ltr"><<a href="mailto:t.i.m@zen.co.uk">t.i.m@zen.co.uk</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Mon, 2012-03-05 at 14:56 +0200, Χρήστος Τριανταφύλλης wrote:<br>
<br>
> i am writing a music player and i want to know if gstreamer supports<br>
> utf-8 and unicode because i have a problem here:<br>
><br>
> info = newitem.discover_uri("file://" + path)<br>
> UnicodeEncodeError: 'ascii' codec can't encode characters in position<br>
> 19-25: ordinal not in range(128)<br>
><br>
> the program is written in Python<br>
<br>
</div></div>That is not how you create a valid URI from a filename.<br>
<br>
Use gst.filename_to_uri(path) instead (on Linux/*nix systems the<br>
filename is just a bunch of bytes in whatever encoding the filesystem<br>
uses. On Windows, the filename must be in UTF-8 format).<br>
<br>
Cheers<br>
-Tim<br>
<br>
<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div><br>