GNOME Bugzilla – Bug 752945
validate:tools: set locale to all
Last modified: 2015-08-16 13:40:49 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.
Created attachment 308267 [details] [review] set locale to all
Where does that error come from exactly? It sounds like the wrong functions are used to handle file names somewhere.
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
Similar change was made for ges-launch in https://bugzilla.gnome.org/show_bug.cgi?id=702425
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).
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?
Setting the locale still makes sense, so I would do both.
Created attachment 308355 [details] [review] set locale to all changing as per review comments
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