Command line parameters

John Emmas johne53 at
Tue Jun 12 05:59:04 CDT 2012

On 7 Jun 2012, at 21:43, Hin-Tak Leung wrote:

> --- On Thu, 7/6/12, Dan Kegel <dank at> wrote:
>> Example:
>>    wine notepad /home/dank/foo.txt
>> This fails because notepad treats / as the beginning of an
>> option (see
>> ).
>> So, no, Wine doesn't translate arguments for you.
> It would probably work in any of these though:
> z:/home/dank/foo.txt
> h:/foo.txt
> \\home\\dank\\foo.txt
> h:\\foo.txt
> (the double backslash for its been interpreted by bash, or whatever shell you use)

Thanks Hin-Tak and Dan but I think we're at crossed purposes now.  Remember that my original question had nothing to do with paths.  I simply used paths as a convenient example.  My question is about command-line parameters and (more specifically) about UTF-8 string conversion.  Here's an example....  Consider a Windows user whose name is Göran.  The UTF-8 byte sequence for this is:-

47 C3 B6 72 61 6E   --   (6 bytes)

whereas Windows would expect something like this (depending on the user's locale):-

47 F6 72 61 6E   --   (5 bytes)

Let's suppose that a Linux app launches a Windows child process (via Wine).  The (Linux) host app needs to pass the string "Göran" as one of the command-line parameters.   Linux uses UTF-8 and will therefore pass the first sequence of bytes to Wine (6 bytes).  But Windows doesn't understand UTF-8.  A Windows app would expect the second byte sequence (5 bytes - or 10 bytes for a Unicode app).

Does Wine carry out the necessary conversion or does it simply pass the original byte string unmodified?  That's what I'm trying to find out.  Thanks.


More information about the wine-devel mailing list