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

Stefan Sperling stsp at elego.de
Thu Feb 2 13:45:06 CST 2012


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.




More information about the svnbook-dev mailing list