From: David Kastrup Subject: Re: Stupid quoting... Date: Wed, 20 Jun 2007 09:49:06 +0200 Message-ID: <86y7ifoykt.fsf@lola.quinscape.zz> References: <86ir9sw0pi.fsf@lola.quinscape.zz> <86ir9l1ylc.fsf@lola.quinscape.zz> <86sl8owfqj.fsf@lola.quinscape.zz> <86645kutow.fsf@lola.quinscape.zz> <7vd4zrw3k4.fsf@assigned-by-dhcp.pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Wed Jun 20 09:58:32 2007 Return-path: Envelope-to: gcvg-git@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1I0v5E-000099-98 for gcvg-git@gmane.org; Wed, 20 Jun 2007 09:58:32 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762275AbXFTH6H (ORCPT ); Wed, 20 Jun 2007 03:58:07 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1762249AbXFTH6H (ORCPT ); Wed, 20 Jun 2007 03:58:07 -0400 Received: from main.gmane.org ([80.91.229.2]:36644 "EHLO ciao.gmane.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762194AbXFTH6F (ORCPT ); Wed, 20 Jun 2007 03:58:05 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1I0v2R-0004Kg-8g for git@vger.kernel.org; Wed, 20 Jun 2007 09:55:39 +0200 Received: from pd95b0fdb.dip0.t-ipconnect.de ([217.91.15.219]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Jun 2007 09:55:39 +0200 Received: from dak by pd95b0fdb.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Jun 2007 09:55:39 +0200 X-Injected-Via-Gmane: http://gmane.org/ X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: pd95b0fdb.dip0.t-ipconnect.de User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.51 (gnu/linux) Cancel-Lock: sha1:l9xY0yD6jzk8PC1B45ZeXG42k38= Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: Junio C Hamano writes: > Johannes Schindelin writes: > >>> I don't see our discourse leading anywhere: the points have been made. >> >> I would really, really, really like to see a solution. Alas, I >> cannot think of one, other than _forcing_ the developers to use >> ASCII-only filenames. And ASCII-only files. Just eradicate that dreaded Bit 7 from the world. >> Note that there is no convention yet in Git to state which encoding >> your filenames are supposed to use. And in fact, we already had a >> fine example in git.git why this is particularly difficult. MacOSX >> is too clever to be true, in that it gladly takes filenames in one >> encoding, but reads those filenames out in _another_ >> encoding. Thus, a "git add " can well end up in >> git-status saying that a file was deleted, and another file >> (actually the same, but in a different encoding) is untracked. > > Having said that, the absolute minimum that needs to be quoted are > double-quote (because it is used by quoting as agreed with GNU > diff/patch maintainer), backslash (used to introduce C-like > quoting), > newline and horizontal tab (makes "patch" confused, as it would make > it ambiguous where the pathname ends), so I am not opposed to a > patch that introduces a new mode, probably on by default _unless_ we > are generating --format=email, that does not quote high byte values. I think it would be ok to quote non-graphic characters with octal escape sequences. On ASCII-based systems, those are the characters 0x00 to 0x1f. They don't have a visual representation of their own, anyway. _IF_ they appear in filenames, it is certainly a case involved with excessive cleverness and/or garbage. I'd leave the rest alone. > That would solve "My UTF-8 filenames are unreadable on my terminal" > problem. But there is no point if the most primitive of mail readers does a better job than listing the directory will. 7-Bit terminals are the wrong thing to use for manipulating 8-bit-encoded files, period. And the escape sequences for 8-bit terminals are quite certain to start with characters in the 0x00 to 0x1f range. -- David Kastrup