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

Re: Encoding of repository hook parameters

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-12-14 18:24:54 CET

"Michael Pilato" <cmpilato@collab.net> writes:

> On Wed, 2005-12-14 at 16:34 +0000, Philip Martin wrote:
>> Peter Samuelson <peter@p12n.org> writes:
>>
>> > [Philip Martin]
>> >> The first argument to all the repository hooks is the path to the
>> >> repository and the value has been converted from UTF-8 to the native
>> >> encoding of the process that invoked the hook.
>> >
>> > Wait, why are you treating a filename on the host system as anything
>> > other than an opaque string of bytes?
>>
>> That's the way Subversion has always worked. Inside the libraries
>> paths are UTF-8 and they get converted to/from the native encoding
>> when communicating with the 'outside world'.
>
> This is all true, yet largely irrelevant to Philip's initial question.
> Regardless of the transformations a path has gone through between the
> opening of a repository for commit purposes and the running of the
> commit-related hook scripts, those scripts might need to know (for
> whatever reason) what encoding the repository path as provided to them
> is, and the environment given them (which is where such hints typically
> live) lacks this information.

I think we could have designed Subversion such that external paths,
like the repository path, were just opaque strings of bytes that get
passed around without modification--then the encoding would be
irrelevant. I think such a system could work, on traditional Unix
anyway, but we chose to use UTF-8 in the Subversion API and so the
encoding matters.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Dec 14 18:26:47 2005

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.