X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Thu, 31 Dec 2009 11:25:53 -0500 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: cygwin passes argv with preserved (") quote. and it is undesired result. Message-ID: <20091231162553.GC4737@ednor.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: MIME-Version: 1.0 Content-Type: text/plain; charset=unknown-8bit Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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 05:00:25PM +0900, jojelino wrote: >hi >here is testcase to reproduce the problem > >#include >#include >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. 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