[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: Daniel Shahaf <danielsh_at_elego.de>
Date: Thu, 2 Feb 2012 22:01:23 +0200

Stefan Sperling wrote on Thu, Feb 02, 2012 at 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.
>

Actually I was referring to the former: if admins may want to change
their hooks for UTF-8 support, then people who write generic hooks will
want to have an if() in their code.

> 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.

Locale names aren't too portable, are they?

What guarantees that an English locale is installed?
Received on 2012-02-02 21:02:42 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.