[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Add description for SVNUseUTF8 (issue #2487)

From: Stefan Sperling <stsp_at_elego.de>
Date: Thu, 2 Feb 2012 23:11:23 +0100

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.
Received on 2012-02-02 23:12:00 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.