GNOME Bugzilla – Bug 723164
gst-discoverer: Support non-ASCII tags
Last modified: 2014-06-22 15:54:41 UTC
.
Created attachment 267404 [details] [review] gst-discoverer: Support non-ASCII tags By calling setlocale() to get us multi-byte/UTF-8 support.
This also probably needs to happen in other command-line tools.
Why is that necessary? And why setting it to ""? Shouldn't it just use whatever locale the user is using by default?
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.
Alright, seems a bit weird but ok :) Do you want to provide patches for the other tools too?
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
Fixed in all other tools too now
Thanks!