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 752945 - validate:tools: set locale to all
validate:tools: set locale to all
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-devtools
git master
Other Linux
: Normal enhancement
: 1.5.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-07-27 23:55 UTC by Vineeth
Modified: 2015-08-16 13:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
set locale to all (1.32 KB, patch)
2015-07-27 23:56 UTC, Vineeth
none Details | Review
set locale to all (1.92 KB, patch)
2015-07-29 07:48 UTC, Vineeth
committed Details | Review

Description Vineeth 2015-07-27 23:55:40 UTC
When file name consists of characters from other languages, say korean, 
then it throws an error
Error initializing: Invalid byte sequence in conversion input

Hence setting locale to all to fix this.
Comment 1 Vineeth 2015-07-27 23:56:37 UTC
Created attachment 308267 [details] [review]
set locale to all
Comment 2 Tim-Philipp Müller 2015-07-28 07:47:59 UTC
Where does that error come from exactly? It sounds like the wrong functions are used to handle file names somewhere.
Comment 3 Vineeth 2015-07-28 07:57:45 UTC
I have a media file named in korean. When i run Gst-validate-launcher --medias-paths for that file, then internally it generates the below command

gst-validate-1.0 playbin uri=file:///home/vineethtm/gst/master/temp/%EA%B0%90%EB%8F%99%EA%B3%B5%EC%8B%9D.mp4 --set-media-info "/home/vineethtm/gst/master/temp/감동공식.mp4.media_info"
Error initializing: Invalid byte sequence in conversion input
Comment 4 Vineeth 2015-07-28 08:30:43 UTC
Similar change was made for ges-launch in
https://bugzilla.gnome.org/show_bug.cgi?id=702425
Comment 5 Tim-Philipp Müller 2015-07-28 08:48:18 UTC
The change is fine of course.

However, I also wonder if it should be G_OPTION_ARG_FILENAME instead of G_OPTION_ARG_STRING here for --set-media-info.

Filenames on unix should be considered as opaque bytes (which may be in a completely different character encoding than the current locale).
Comment 6 Vineeth 2015-07-28 23:42:10 UTC
setting the argument to G_OPTION_ARG_FILENAME, works without the setlocale function.. So probably that is the better change to do here?
In that case does setting the locale make sense? or just G_OPTION_ARG_FILENAME is enough?
Comment 7 Tim-Philipp Müller 2015-07-29 07:40:48 UTC
Setting the locale still makes sense, so I would do both.
Comment 8 Vineeth 2015-07-29 07:48:21 UTC
Created attachment 308355 [details] [review]
set locale to all

changing as per review comments
Comment 9 Tim-Philipp Müller 2015-07-30 13:09:01 UTC
Pushed, thanks:

commit c91ed016b1b49322ba11f71aa2b3dce1a18d88aa
Author: Vineeth TM <vineeth.tm@samsung.com>
Date:   Wed Jul 29 16:42:48 2015 +0900

    validate:tools: set locale to all and change argument to FILENAME
    
    When file name consists of characters from other languages, say korean,
    then it throws an error
    Error initializing: Invalid byte sequence in conversion input
    
    Hence setting locale to all to fix this.
    And changing the media-info argument to type G_OPTION_ARG_FILENAME
    
    https://bugzilla.gnome.org/show_bug.cgi?id=752945