delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/01/01/14:26:28

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Fri, 1 Jan 2010 14:16:59 -0500
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: cygwin passes argv with preserved (") quote. and it is undesired result.
Message-ID: <20100101191658.GA32463@ednor.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <hhhlmo$68u$1 AT ger DOT gmane DOT org> <20091231162553 DOT GC4737 AT ednor DOT casa DOT cgf DOT cx>
MIME-Version: 1.0
In-Reply-To: <20091231162553.GC4737@ednor.casa.cgf.cx>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Thu, Dec 31, 2009 at 11:25:53AM -0500, Christopher Faylor wrote:
>On Thu, Dec 31, 2009 at 05:00:25PM +0900, jojelino wrote:
>>hi
>>here is testcase to reproduce the problem
>>
>>#include <stdio.h>
>>#include <assert.h>
>>int main(int argc, char**argv)
>>{
>>printf("argv %s",argv[1]);
>>open(argv[1],"r");
>>assert(fp);
>>return 0;
>>}
>>build
>>make ¤±.txt in directory.
>>and run in cmd.exe
>>type,
>>a "¤±.txt"
>>
>>and it complains file can't be opened.
>>and you can see argv[1]  is passed with preserved quote (") although it is 
>>invoked in winshell
>>it must be eliminted when it is transduced to cygwin environment.
>
>I don't see preserved quotes but I do see that ARGV has apparently been
>changed to UTF-8 and is represented as: -ñ-¦.txt
>
>Try setting LANG to something appropriate in your MS-DOS session and see
>if that makes things work better.

I think I've fixed this problem in the upcoming cygwin snapshot at:

http://cygwin.com/snapshots/

if you want to give it a try.  It will be in *today's* snapshot, not the
one from 12/29.

cgf

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019