From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: on eshell's encoding Date: Wed, 27 Jul 2016 19:15:45 +0600 Message-ID: References: <86fuqw5vd8.fsf@toledo.com> <864m7c5oqc.fsf@toledo.com> <86zip3uweo.fsf@toledo.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1469625408 9774 80.91.229.3 (27 Jul 2016 13:16:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Jul 2016 13:16:48 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: Daniel Bastos Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 27 15:16:47 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bSOha-0007Vm-Bw for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Jul 2016 15:16:46 +0200 Original-Received: from localhost ([::1]:46445 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSOhZ-0004Y1-EZ for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Jul 2016 09:16:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36576) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSOgx-0004WN-0B for help-gnu-emacs@gnu.org; Wed, 27 Jul 2016 09:16:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSOgv-0003ND-Uf for help-gnu-emacs@gnu.org; Wed, 27 Jul 2016 09:16:06 -0400 Original-Received: from mail-lf0-x22c.google.com ([2a00:1450:4010:c07::22c]:36195) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSOgv-0003N1-La for help-gnu-emacs@gnu.org; Wed, 27 Jul 2016 09:16:05 -0400 Original-Received: by mail-lf0-x22c.google.com with SMTP id g62so27050405lfe.3 for ; Wed, 27 Jul 2016 06:16:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=yA47ViV8vGS3Uu8zJ5ctepBF82uSOQe+KG5m0LhGI5E=; b=vQ1YWLvuXuCFYRFpAZlFBlOrWlgPr6eMbXmVAWVTw2gO0r6yjt7dOXFVn7e9nQcgsj yG7aapbgPrsW8jMjLeY3zZZpErAwZYf6MTOCTj1b3hA3W/97a8lW4lMWhRRBEd3xO0Kl 7+UYdRjtt/VAYklNdkQ0JG4Wb94yQQMzwdHbpfF43zrtwVVwe7eh/Ir+rBjHUXbD8vbG MhE6/Ge3GZIXgVX/0ctrxe/lbhZWeJc+RX9R+/Y5Rn2rUI1d+X8xqFlLbnxTga0CLuxA LJX8pUmk7s65TUJFrc/pxxydI8l7c0Do/fyxQWES8TAt6uHufoh5RxAcNmRIT1rrpegR ocog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=yA47ViV8vGS3Uu8zJ5ctepBF82uSOQe+KG5m0LhGI5E=; b=RYfulL0sAXBwB4jsMKKngUzUpO6cLCqwLHd8tiRI4mJ2/yu+q8moqXds6i0dD8ZP6g yGcz8aidGwUDuPZFW54Jpx9yG/BQo7VZ9FoP2AYn02Ca7KepL17xz5Hnfiqkye6gNdli 4u8feyI51Wl2xd6z5oeLOWOE11n1+8ARozXyS1JQXs0+wMkytJ+QjkQqP6AtO/6RPCAw 0qhL82WJTF3ZUQQFB04LXKAUkzi77Fzp/Gi5yAkdsOhBoMEVuXvftskQDjMfLaV2wjz3 tZzo3YJMAZAmx++bEC9jHAK/+EtsB6lCaRIi7yPDIrqS8tV9+jfb5+yAVV6UYG/pjimd 5IHw== X-Gm-Message-State: AEkoouusNeVOyr6Qod+JaZUGmd97ZAaejc8a4iA7tvuXVdJyZN7tbibxlS9J0yMt5BlBJgeU3uA32WS8yjbMPw== X-Received: by 10.25.144.8 with SMTP id s8mr11816097lfd.94.1469625364897; Wed, 27 Jul 2016 06:16:04 -0700 (PDT) Original-Received: by 10.114.180.131 with HTTP; Wed, 27 Jul 2016 06:15:45 -0700 (PDT) In-Reply-To: <86zip3uweo.fsf@toledo.com> X-Google-Sender-Auth: mgMfiunm_0Hq2fyipF0Y090Y4Lg X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::22c X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:110946 Archived-At: On Wed, Jul 27, 2016 at 6:56 PM, Daniel Bastos wrote: > I meant not being messed with. I don't know anything about MS-Windows. > In UNIX the creation of a new process by a shell is likely to call > execve, which won't touch the caller strings passed in through the > argv-argument. Well Windows is a different beast entirely. The basic premise is the same, in that the parent invokes CreateProcessW, passing a UTF-16-encoded command line, and the child process invokes GetCommandLineW and then optionally CommandLineToArgvW to split the command line into arguments. Problem is, most programs prefer to work internally with 8-bit-based encodings, and the Win32 API makes it very easy by providing backward compatibility wrapper functions CreateProcessA and GetCommandLineA, which unfortunately convert from/to the ANSI or OEM encoding defined by the locale. And there is no Win32 locale for which UTF-8 is either the ANSI or the OEM encoding. This one point makes it very difficult to use Windows in the Unix Way: you get to worry about encodings on every process boundary.