subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Sperling <s...@elego.de>
Subject Re: [PATCH] Add description for SVNUseUTF8 (issue #2487)
Date Thu, 02 Feb 2012 22:11:23 GMT
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.

Mime
View raw message