From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Gustav =?UTF-8?Q?H=C3=A5llberg?= Newsgroups: gmane.emacs.bugs Subject: bug#11208: 23.4; shell-command-on-region does not {de,en}code as documented Date: Mon, 9 Apr 2012 13:09:07 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8f646e75f50c4704bd3d081f X-Trace: dough.gmane.org 1333988000 28587 80.91.229.3 (9 Apr 2012 16:13:20 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 9 Apr 2012 16:13:20 +0000 (UTC) To: 11208@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 09 18:13:19 2012 Return-path: Envelope-to: geb-bug-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 1SHHDM-0000uZ-QL for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Apr 2012 18:13:13 +0200 Original-Received: from localhost ([::1]:46960 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHHDM-0006u1-4s for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Apr 2012 12:13:12 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58299) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHHDH-0006nC-Rt for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2012 12:13:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SHHDG-00056A-72 for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2012 12:13:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50482) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHHDG-000565-1U for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2012 12:13:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SHHEA-0004DJ-4V for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2012 12:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gustav =?UTF-8?Q?H=C3=A5llberg?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Apr 2012 16:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 11208 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.133398799716114 (code B ref -1); Mon, 09 Apr 2012 16:14:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 9 Apr 2012 16:13:17 +0000 Original-Received: from localhost ([127.0.0.1]:47009 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SHHDQ-0004Bn-8A for submit@debbugs.gnu.org; Mon, 09 Apr 2012 12:13:17 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54397) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SHCU7-0004kQ-JC for submit@debbugs.gnu.org; Mon, 09 Apr 2012 07:10:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SHCTC-0006gC-LL for submit@debbugs.gnu.org; Mon, 09 Apr 2012 07:09:15 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:52534) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHCTC-0006fW-F7 for submit@debbugs.gnu.org; Mon, 09 Apr 2012 07:09:14 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHCTA-0002Ii-K1 for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2012 07:09:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SHCT8-0006XW-Io for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2012 07:09:11 -0400 Original-Received: from mail-ob0-f169.google.com ([209.85.214.169]:56484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHCT8-0006WU-Ad for bug-gnu-emacs@gnu.org; Mon, 09 Apr 2012 07:09:10 -0400 Original-Received: by obbta14 with SMTP id ta14so6729793obb.0 for ; Mon, 09 Apr 2012 04:09:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=WSNSGngnCNB3rmalzydDqd4oXuVZutPD+buW5CY//ZE=; b=XoISDwDYlniaG5X6QZr6FHB9gQIypirZvhGI0D2oVa4AG75LYYs4PXhtr94EQOXQ0q 9F+z9kS6G55YL19D04xgkKcWoQlMGr/IUI+blFHzjBGJuDcbD/0oYwnGcRGuvGXr4l8b C9D3u5V4XfEck7/B9HrPfdrMw74QapVc0CzDLgqubrQsbmSkoipG3PxbG75/aZ/D26hP Va4w2DOVXe+uANkwnsLP5Lk0ED3z/m+geYNP0SdGFWgHLe/7foA6E9Dz3E0d0ns8YMJT B5Zln2uQ8Ff8mUqBiv+Vel1XE2VLi7IiCn5DQlys6wrI+9qhnL9jhXjZvD86d08mKW1O BPow== Original-Received: by 10.182.136.41 with SMTP id px9mr9696568obb.21.1333969747774; Mon, 09 Apr 2012 04:09:07 -0700 (PDT) Original-Received: by 10.182.1.1 with HTTP; Mon, 9 Apr 2012 04:09:07 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Mon, 09 Apr 2012 12:13:14 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:58645 Archived-At: --e89a8f646e75f50c4704bd3d081f Content-Type: text/plain; charset=ISO-8859-1 shell-command-on-region (M-|) does not do the {de,en}coding of I/O to the process as documented. It says (if I read it correctly) that it will use buffer-file-coding-system (at least unless coding-system-for-{read,write} are set) for output to and input from (if doing substitution with a prefix argument) the process. However, it "just" calls call-process-region which will use default-process-coding-system rather than buffer-file-coding-system. To try, 'emacs -q', switch to an empty buffer, and: C-x RET f iso-8859-7 RET C-SPC C-u M-| echo -e '\0245' RET This does not insert a drachma sign. However, if you run (setq default-process-coding-system '(iso-8859-7 iso-8859-7)) first, it does indeed produce a drachma. Output encoding works the same way. - Gustav --e89a8f646e75f50c4704bd3d081f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable shell-command-on-region (M-|) does not do the {de,en}coding of I/O to the p= rocess as documented.

It says (if I read it correctly) t= hat it will use buffer-file-coding-system (at least unless coding-system-fo= r-{read,write} are set) for output to and input from (if doing substitution= with a prefix argument) the process.

However, it "just" calls call-process-region = which will use default-process-coding-system rather than buffer-file-coding= -system.

To try, 'emacs -q', switch to an = empty buffer, and:

=A0 C-x RET f iso-8859-7 RET C-SPC C-u M-| echo -e '= ;\0245' RET

This does not insert a drachma sig= n.

However, if you run=A0(setq default-process-cod= ing-system '(iso-8859-7 iso-8859-7)) first, it does indeed produce a dr= achma.

Output encoding works the same way.

- Gustav

--e89a8f646e75f50c4704bd3d081f--