After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 723164 - gst-discoverer: Support non-ASCII tags
gst-discoverer: Support non-ASCII tags
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
unspecified
Other All
: Normal normal
: 1.3.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-01-28 13:45 UTC by Bastien Nocera
Modified: 2014-06-22 15:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gst-discoverer: Support non-ASCII tags (891 bytes, patch)
2014-01-28 13:45 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2014-01-28 13:45:42 UTC
.
Comment 1 Bastien Nocera 2014-01-28 13:45:45 UTC
Created attachment 267404 [details] [review]
gst-discoverer: Support non-ASCII tags

By calling setlocale() to get us multi-byte/UTF-8 support.
Comment 2 Bastien Nocera 2014-01-28 13:47:57 UTC
This also probably needs to happen in other command-line tools.
Comment 3 Sebastian Dröge (slomo) 2014-01-29 19:19:17 UTC
Why is that necessary? And why setting it to ""? Shouldn't it just use whatever locale the user is using by default?
Comment 4 Bastien Nocera 2014-01-29 21:05:48 UTC
From the setlocale() man page:
--8<--
       The locale argument is a pointer to a character string containing the required setting of category. The contents of this string are implementation-defined. In  addi‐
       tion, the following preset values of locale are defined for all settings of category:

       "POSIX"
              Specifies  the minimal environment for C-language translation called the POSIX locale. If setlocale() is not invoked, the POSIX locale is the default at entry
              to main().

       "C"    Equivalent to "POSIX" .

       ""     Specifies an implementation-defined native environment.  This corresponds to the value of the associated environment variables, LC_* and LANG ; see  the  Base
              Definitions volume of IEEE Std 1003.1-2001, Chapter 7, Locale and the Base Definitions volume of IEEE Std 1003.1-2001, Chapter 8, Environment Variables.
--8<--

If you don't call it, you have a C locale, which can't handle UTF-8 or wide characters. If you call it with "" you set up the user's current locale.
Comment 5 Sebastian Dröge (slomo) 2014-01-30 19:12:07 UTC
Alright, seems a bit weird but ok :) Do you want to provide patches for the other tools too?
Comment 6 Sebastian Dröge (slomo) 2014-01-30 19:16:51 UTC
Comment on attachment 267404 [details] [review]
gst-discoverer: Support non-ASCII tags

commit f2c1f915082f27af5e05c06985faddbda5e2e878
Author: Bastien Nocera <hadess@hadess.net>
Date:   Tue Jan 28 14:28:27 2014 +0100

    gst-discoverer: Support non-ASCII tags
    
    By calling setlocale() to get us multi-byte/UTF-8 support.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=723164
Comment 7 Sebastian Dröge (slomo) 2014-01-30 20:29:54 UTC
Fixed in all other tools too now
Comment 8 Bastien Nocera 2014-01-30 23:07:32 UTC
Thanks!