From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Laimonas =?UTF-8?Q?V=C4=97bra?= Newsgroups: gmane.emacs.bugs Subject: bug#6705: w32 cmdproxy.c pass args to cygwin; erroneous charset conversion (problem description, solution/suggestion) Date: Fri, 23 Jul 2010 18:35:40 +0300 Message-ID: <4C49B6CC.9030509@gmail.com> References: <4C483A30.9010804@gmail.com> <83lj93cn42.fsf@gnu.org> <4C48B11D.4050202@gmail.com> <831vauv6q1.fsf@gnu.org> <4C4991CA.3010103@gmail.com> <83pqyetgeo.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1279899588 28589 80.91.229.12 (23 Jul 2010 15:39:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 23 Jul 2010 15:39:48 +0000 (UTC) Cc: 6705@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 23 17:39:46 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OcKLg-00086R-UF for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 Jul 2010 17:39:45 +0200 Original-Received: from localhost ([127.0.0.1]:38382 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OcKJh-0004AM-Qt for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 Jul 2010 11:37:41 -0400 Original-Received: from [140.186.70.92] (port=41735 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OcKJU-00047u-UZ for bug-gnu-emacs@gnu.org; Fri, 23 Jul 2010 11:37:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OcKJR-0008Jm-2Y for bug-gnu-emacs@gnu.org; Fri, 23 Jul 2010 11:37:28 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48655) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OcKJR-0008Jd-17 for bug-gnu-emacs@gnu.org; Fri, 23 Jul 2010 11:37:25 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OcKI6-0004ih-OR; Fri, 23 Jul 2010 11:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Laimonas =?UTF-8?Q?V=C4=97bra?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Jul 2010 15:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6705 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6705-submit@debbugs.gnu.org id=B6705.127989935218134 (code B ref 6705); Fri, 23 Jul 2010 15:36:02 +0000 Original-Received: (at 6705) by debbugs.gnu.org; 23 Jul 2010 15:35:52 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OcKHv-0004iR-9M for submit@debbugs.gnu.org; Fri, 23 Jul 2010 11:35:51 -0400 Original-Received: from mail-ew0-f44.google.com ([209.85.215.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OcKHt-0004iM-Hf for 6705@debbugs.gnu.org; Fri, 23 Jul 2010 11:35:50 -0400 Original-Received: by ewy22 with SMTP id 22so142299ewy.3 for <6705@debbugs.gnu.org>; Fri, 23 Jul 2010 08:35:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=O3fpYDYa+FoaCSfGLjYwDb8mvgORbzNNjAexO0D9G/o=; b=GxW3YOhbC443Gs0p2wXr3FnZZOtpPR/OY5g4RcUNXSTZW6LDiJt8b1mxqomTCToTDq +GOqqmIpM4u/Ng+IOLYN/Yo7GUHlKMzryWsnucWbYmzySQQC8xGMd4XybdYt6ctILKXQ sGsKlceH1PC6Z1p2jEyZftrwzJeP3EPBWf0bw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=u5sq8Jji/ippQkuCBolinpHp2Km0+9UKJhhezIpmAJcpvYfH+dro8FQZW8oujTZL79 imNVT3lnWErRYxA4L8VgJpvBW6jv/7oy5NUR515+qXhAN1vLIiK3KR2FbbnfKlfA2gFl khauB/+GjTlYc4ByLilMK4IKnEaEvHdGUAr5c= Original-Received: by 10.213.12.196 with SMTP id y4mr692380eby.61.1279899346742; Fri, 23 Jul 2010 08:35:46 -0700 (PDT) Original-Received: from [192.168.2.2] (lan-84-240-35-136.vln.skynet.lt [84.240.35.136]) by mx.google.com with ESMTPS id v59sm563393eeh.4.2010.07.23.08.35.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 23 Jul 2010 08:35:46 -0700 (PDT) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6 In-Reply-To: <83pqyetgeo.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 23 Jul 2010 11:36:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:38828 Archived-At: Eli Zaretskii wrote: >> Date: Fri, 23 Jul 2010 15:57:46 +0300 >> From: Laimonas Vėbra >> CC: 6705@debbugs.gnu.org >> >> It's not the problem to pass utf-8 arguments to natvive (mingw) >> apps. > > If these MinGW applications use Unicode (UTF-16) APIs, that's true. > But if they use the ANSI APIs (and most of them do), then you simply > cannot pass to them command-line arguments encoded in any encoding > other than the current codepage. It's not true when we're launching subprocess using CreateProcessA() and passing args to it, i.e. like Emacs does). Try: #include int main (int argc, char ** argv) { printf("argv[1]: %s\n", argv[1]); return 0; } gcc.EXE (GCC) 3.4.5 (mingw-vista special r3) gcc -o test test.c M-x grep test.exe "ĔĿİ" > out.txt $ cat out.txt argv[1]: ĔĿİ > In my view, users of the w32 build of Emacs who use Cygwin tools > outside Emacs are a minority. There are native w32 ports of most of > the tools you have in Cygwin, and there is the Cygwin build of Emacs. > I don't see why the handful of Emacs developers who contribute to the > w32 port should invest a significant part of their scarce resources on bzr log says that much of the active development of the w32proc.c and others actually ended somewhere in the 2001-2003... ;-) On the other hand -- why when you think w32 developers should invest their time developing w32 stuff at all (if we have cygwin build which works „pretty well“)...? > fixing incompatibilities between the w32 Emacs and Cygwin, when a > Cygwin build of Emacs is available and works pretty well, judging by > the few of its users who are active on the emacs-devel list. I don't Are they using it in unicode aspect/context? It's the most important question, because many people don't get any problems if their are not dealing with unicode (or at first/least with non english ansi/multilingual aspects). > know why you say it's "potentially" more buggy -- it uses mostly the > same code that runs on GNU/Linux, so actually it should be _less_ > buggy than the native w32 build, because it is used by a larger number > of users. Did you even try to switch to the Cygwin build? If not, > perhaps you should. Same question -- why when bother with w32 development at all?