On 05/08/2012 10:46 PM, Eli Zaretskii wrote:
Can you be more specific in your question? Are you asking whether any byte stream is allowed in the command-line arguments?
The basic idea is that we're trying to emulate a function like execvp, which takes an array of C strings and which does not care about encoding. On a host that doesn't have fork+execvp we are taking the array and quoting it suitably for popen or for system. In POSIX this cannot be done portably, since the arguments to popen/system must be encoded suitably for the current locale (typically UTF-8 these days) and encoding errors are not allowed. Presumably the code will just put the bytes into the string and hope for the best; often in POSIXish environments it will work despite the encoding error. My assumption is that Windows is similar. The main reason I'm asking, I suppose, is that the issue should probably be documented.
