Quotes around command-line argument that has unicode characters are not removed

Kaz Kylheku 920-082-4242@kylheku.com
Thu Mar 22 17:25:00 GMT 2018


On 2018-03-22 04:24, Andrey Repin wrote:
> Greetings, Dmitry Katsubo!
> 
>> Dear Cygwin community,
> 
>> I observe the following on my Cygwin:
> 
> This is not cygwin, this is bare Windows.

That may be so, yet there may be an issue here for someone packaging
Cygwin programs for use as native Windows applications.

That is to say, there could potentially be something here that the 
Cygnal
project could address:

http://www.kylheku.com/cygnal/

Cygnal is an ultra-light fork of the Cygwin DLL that is intended for 
users like Dmitry Katsubo, who run Cygwin programs out of the Windows 
environment directly, after building them in Cygwin.

> 
>> when I put quotes around file that has
>> non-ASCII symbols, these quotes are passed to argv of the process 
>> literally,
>> otherwise they are removed. I would expect that there is a 
>> consistency.
> 
> Parameter unquoting done by the shell.
> CMD does that differently from POSIX shells.

As I seem to recall, CMD doesn't do anything, period! It passes the 
command line
as one big string. It has to since that's the OS mechanism.

The quoting conventions come from how various run-time libraries deal 
with that
string. An influential convention is that of the MS Visual C run-time 
library;
it behooves other run-times to be compatible with that for consistency 
with
programs whose main() was compiled with MSVC.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list