[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 20:45:06 +0100

On Thu, Feb 02, 2012 at 09:23:26PM +0200, Daniel Shahaf wrote:
> CC += dev@
>
> Stefan Sperling wrote on Thu, Feb 02, 2012 at 19:43:12 +0100:
> > On Thu, Feb 02, 2012 at 07:57:58PM +0200, Daniel Shahaf wrote:
> > > Neels J Hofmeyr wrote on Thu, Feb 02, 2012 at 17:51:01 +0100:
> > > > + becomes possible. Note that your hook scripts must then
> > > > + operate in the UTF-8 character set regardless of the
> > >
> > > How are scripts supposed to know this? Shouldn't we communicate to them
> > > the expectations of them (via argv or env)?
> >
> > Admins are supposed to know this and adjust their hooks accordingly.
> >
> > Note that before this change non-ASCII didn't work in hooks anyway.
> > Existing hooks can only be using ASCII which is a subset of UTF-8.
>
> Right. So now all hooks should grow a config knob "May I output UTF-8?"
> (in case they're invoked on an ASCII fspath or repos_path but wish to
> output UTF-8). It still appears to me that passing this bit to the
> scripts from svn would be a more robust design.

Are you talking about cases where the author of the hook doesn't
know the value of the configuration option but would like to write
different code depending on whether it is set or not?

Or about behaviour of e.g. 'svnlook' when invoked from within a hook
script which has an empty environment but is given a UTF-8 path?

The latter does indeed seem to be a problem. Now that mod_dav_svn
can pass UTF-8 paths to a hook, commands invoked from the hook need
to be able to process UTF-8, too.

The easiest thing we could so is to set LC_CTYPE to en_US.UTF-8
in the hook's environment if SVNUseUTF-8 is enabled. This allows
tools like svnlook to procress UTF-8 when invoked from the hook.
Received on 2012-02-02 20:46:09 CET

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