Originally, I was going to post this on wine-users but after I wrote it, it seemed like wine-devel might be more appropriate. Please let me know if I need to re-submit it to wine-users.
I understand that Wine is mostly used for running Windows apps on Linux - i.e. in most cases, the user will be launching the Windows app manually. But what about a Linux application that needs to launch a Windows app? What does Wine do (if anything) about command-line parameters..?
After using fork() to create a new process, this would be a typical program command to start Wine and the Windows app:-
execl (the_path_to_wine, "wine", path_to_the_windows_program, command_line_parameter_for_windows_app, NULL);
Notice that execl() passes two command-line parameters to Wine (one of which gets passed to the Windows app). Let's assume this is a file path as that's easy to visualize.
In the vast majority of cases, those command-line parameters will get passed to Wine as UTF8 strings. Wine will hopefully understand this when interpreting 'path_to_the_windows_program'. However, Windows programs themselves don't understand UTF8 at all - except for a very limited set of (mostly English) characters. So if that parameter was a file path (e.g. a file that the Windows program needed to open) it would only get understood in an English speaking locale. Non-English characters (accented characters etc) would only get understood if a locale translation takes place.
Is Wine clever enough to realise that the UTF8 string needs to be converted to a locale-specific string, so that the Windows app can understand it? Or does Wine simply pass whatever characters it received, without attempting any translation? Thanks.
John