From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#4047: 23.1.1: hexl-mode doesn't like UTF8 files with a byte-order mark Date: Sat, 08 Aug 2009 18:29:19 +0300 Message-ID: <83zlaal3xs.fsf@gnu.org> References: <20090807085054.036E61BF28D@ws1-10.us4.outblaze.com> <837hxemr9h.fsf@gnu.org> <831vnmmoe3.fsf@gnu.org> Reply-To: Eli Zaretskii , 4047@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1249746450 29738 80.91.229.12 (8 Aug 2009 15:47:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Aug 2009 15:47:30 +0000 (UTC) Cc: 4047@emacsbugs.donarmstrong.com, bogossian@mail.com To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 08 17:47:22 2009 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.50) id 1MZo8e-00051d-JM for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Aug 2009 17:47:21 +0200 Original-Received: from localhost ([127.0.0.1]:55264 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MZo8c-0007ln-Vn for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Aug 2009 11:47:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MZo8I-0007Zw-Kr for bug-gnu-emacs@gnu.org; Sat, 08 Aug 2009 11:46:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MZo8C-0007XC-Tw for bug-gnu-emacs@gnu.org; Sat, 08 Aug 2009 11:46:56 -0400 Original-Received: from [199.232.76.173] (port=44847 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MZo8C-0007X5-KN for bug-gnu-emacs@gnu.org; Sat, 08 Aug 2009 11:46:52 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:41502) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MZo8B-0002dN-Jq for bug-gnu-emacs@gnu.org; Sat, 08 Aug 2009 11:46:52 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n78FkmvV016060; Sat, 8 Aug 2009 08:46:48 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n78FZ6Ee014849; Sat, 8 Aug 2009 08:35:06 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Eli Zaretskii Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 08 Aug 2009 15:35:06 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4047 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4047-submit@emacsbugs.donarmstrong.com id=B4047.124974537714207 (code B ref 4047); Sat, 08 Aug 2009 15:35:06 +0000 Original-Received: (at 4047) by emacsbugs.donarmstrong.com; 8 Aug 2009 15:29:37 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mtaout3.012.net.il (mtaout3.012.net.il [84.95.2.7]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n78FTZas014189 for <4047@emacsbugs.donarmstrong.com>; Sat, 8 Aug 2009 08:29:36 -0700 Original-Received: from conversion-daemon.i_mtaout3.012.net.il by i_mtaout3.012.net.il (HyperSendmail v2004.12) id <0KO200600DNS3K00@i_mtaout3.012.net.il> for 4047@emacsbugs.donarmstrong.com; Sat, 08 Aug 2009 18:29:28 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([77.126.151.173]) by i_mtaout3.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KO2004Q2DOVE0H0@i_mtaout3.012.net.il>; Sat, 08 Aug 2009 18:29:20 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Sat, 08 Aug 2009 11:46:56 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list 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:29996 Archived-At: > From: Andreas Schwab > Cc: 4047@emacsbugs.donarmstrong.com, bogossian@mail.com > Date: Sat, 08 Aug 2009 16:29:31 +0200 > > Eli Zaretskii writes: > > > Btw, I doubt that any encoding that uses BOM can ever be appropriate > > for encoding command-line arguments. Maybe we should treat them > > specially in call-process and its ilk. > > The bug is that hexlify-buffer assumes that manually encoding the > command line stops call-process from encoding it again, which does not > work: coding-system-for-write takes absolute precedence. If encode_coding_string would leave unibyte strings alone (as I think it should, unless there's a good reason not to), the absolute precedence you mention would not matter. Or, if there _is_ a good reason for encode_coding_string's current behavior, we could avoid encoding unibyte strings in the command-line arguments (although admittedly that would be a kludge). > IMHO call-process should not use coding-system-for-write for > encoding the command line But if some of the command-line arguments are file names, say, we do need to encode them, don't we? > if at all there should be a separate override. That'd be fine by me, if there's no better alternative.