From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: on eshell's encoding Date: Wed, 27 Jul 2016 19:14:24 +0300 Message-ID: <83k2g7rrbz.fsf@gnu.org> References: <86fuqw5vd8.fsf@toledo.com> <864m7c5oqc.fsf@toledo.com> <86zip3uweo.fsf@toledo.com> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1469636129 13565 80.91.229.3 (27 Jul 2016 16:15:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Jul 2016 16:15:29 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 27 18:15:24 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 1bSRUQ-0005eQ-Q9 for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Jul 2016 18:15:22 +0200 Original-Received: from localhost ([::1]:47468 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSRUP-0001Mi-Ki for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Jul 2016 12:15:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49458) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSRTg-0001Kh-TN for help-gnu-emacs@gnu.org; Wed, 27 Jul 2016 12:14:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSRTf-0000Wb-Q3 for help-gnu-emacs@gnu.org; Wed, 27 Jul 2016 12:14:36 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58713) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSRTf-0000Vg-OC for help-gnu-emacs@gnu.org; Wed, 27 Jul 2016 12:14:35 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3065 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bSRTd-0005vA-Vy for help-gnu-emacs@gnu.org; Wed, 27 Jul 2016 12:14:34 -0400 In-reply-to: <86zip3uweo.fsf@toledo.com> (message from Daniel Bastos on Wed, 27 Jul 2016 08:56:31 -0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:110947 Archived-At: > From: Daniel Bastos > Date: Wed, 27 Jul 2016 08:56:31 -0300 > > >> You're right. This is MS-Windows. But I thought MS-Windows would not > >> interfere here. Why does it interfere? I thought the messages would go > >> straight into git's ARGV. > > > > How can it go "straight"? > > 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. Like I said, Eshell is not a shell, it just pretends to be one. It will eventually cause execve, or something like it, to be called, but before it, the command-line arguments will be encoded in the locale's encoding, since that's what execve expects. This is true on Windows and on Unix alike. So in this case, the command-line arguments are always "messed with" in Emacs. If your locale happens to use UTF-8, then it will _almost_ look as if the arguments were passed to execve untouched, but that's an illusion, and is certainly incorrect when the locale's codeset is not UTF-8 (which is always true on Windows).