Return-Path: X-Original-To: apmail-subversion-dev-archive@minotaur.apache.org Delivered-To: apmail-subversion-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2BB309091 for ; Thu, 2 Feb 2012 22:11:56 +0000 (UTC) Received: (qmail 58279 invoked by uid 500); 2 Feb 2012 22:11:55 -0000 Delivered-To: apmail-subversion-dev-archive@subversion.apache.org Received: (qmail 58195 invoked by uid 500); 2 Feb 2012 22:11:55 -0000 Mailing-List: contact dev-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@subversion.apache.org Received: (qmail 58178 invoked by uid 99); 2 Feb 2012 22:11:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2012 22:11:54 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [192.109.42.8] (HELO einhorn.in-berlin.de) (192.109.42.8) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2012 22:11:44 +0000 X-Envelope-From: stsp@stsp.name Received: from ted.stsp.name (ted.stsp.name [217.197.84.34]) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id q12MBOeM028751 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 2 Feb 2012 23:11:24 +0100 Received: from ted.stsp.name (stsp@localhost [127.0.0.1]) by ted.stsp.name (8.14.5/8.14.3) with ESMTP id q12MBN8L023621; Thu, 2 Feb 2012 23:11:24 +0100 (CET) Received: (from stsp@localhost) by ted.stsp.name (8.14.5/8.14.3/Submit) id q12MBNwU032642; Thu, 2 Feb 2012 23:11:23 +0100 (CET) Date: Thu, 2 Feb 2012 23:11:23 +0100 From: Stefan Sperling To: Branko =?utf-8?B?xIxpYmVq?= Cc: dev@subversion.apache.org Subject: Re: [PATCH] Add description for SVNUseUTF8 (issue #2487) Message-ID: <20120202221123.GU23501@ted.stsp.name> Mail-Followup-To: Branko =?utf-8?B?xIxpYmVq?= , dev@subversion.apache.org References: <20120202175758.GA19860@daniel3.local> <20120202184312.GI23501@ted.stsp.name> <20120202192326.GA21164@daniel3.local> <20120202194506.GM23501@ted.stsp.name> <20120202200123.GA21770@daniel3.local> <20120202200426.GP23501@ted.stsp.name> <20120202201723.GB22019@daniel3.local> <20120202203753.GS23501@ted.stsp.name> <20120202204633.GA22596@daniel3.local> <4F2AFFA2.3070807@apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4F2AFFA2.3070807@apache.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Feb 02, 2012 at 10:26:58PM +0100, Branko Čibej wrote: > On 02.02.2012 21:46, Daniel Shahaf wrote: > > Stefan Sperling wrote on Thu, Feb 02, 2012 at 21:37:53 +0100: > >> But what do authors gain? Apart from assurance that they may write > >> UTF-8 characters in error messages I don't see any advantage. > > If repos_path, or an fspath argument, isn't ASCII, can hook scripts > > access/use it even if the envvar isn't set? (Or svnlook, when called > > from such a hook script --- which I think you mentioned earlier.) > > Yes. File names are just a string of bytes. As long as the script takes > care to always quote the arguments ("$foo" instead of just $foo), and > not interpret them, then what it passes to other tools will be what it > gets from the server. That's either exactly correct, or totally wrong > already. Exactly. The only problem we have is that 'svn' might try to internally convert the filename from the "native" encoding. Because of the empty environment in a hook script it will assume the native encoding is ASCII (LC_CTYPE isn't set). So the input conversion will fail if a UTF-8 path containing non-ASCII characters is passed to 'svn' by the script. There's nothing the script can do about that without knowing what the locale should be. So we'll need to provide a way to set LC_CTYPE in the environment of hooks.