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

Re: Apache, Subversion hooks, and locales

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Mon, 04 Jan 2010 08:59:50 -0500

Mark Phippard wrote:
> On Mon, Jan 4, 2010 at 8:43 AM, C. Michael Pilato <cmpilato_at_collab.net> wrote:
>> But what about original problem with encodings? If I recall correctly,
>> Apache is intentionally locale-ignorant. Like, not just "I don't know about
>> the system locale", but "I'd like to ignore the system locale. On purpose.
>> For reals." Would an appropriate workaround for this problem be to
>> introduce a mod_dav_svn configuration directive which allows admins to
>> dictate the locale of their hook environment?
> Could we just declare that the paths are passed as UTF-8 strings?
> Most of the hooks do not receive paths, right? So this is kind of
> specific to the lock hooks.

We have the ability technically to pass UTF-8 strings to the hooks. Add
flags down the code stack towards svn_io_start_cmd() that say "Don't convert
the parameters", or somesuch. But is it the right thing to do? On the plus
side, it relieves us of any concern with locale handling in these parts.
But this puts the conversion burden on each and every hook script. And keep
in mind that it's not just the input to the hooks at stake here -- we also
need to consider the output from them (stdout and stderr messaging). Do we
then also expect the hooks to generate UTF-8 output instead of output in the
system's preferred locale (so we can package it up correctly for
transmission back to the client)?

C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on 2010-01-04 15:00:29 CET

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