[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: André Malo <nd_at_perlig.de>
Date: 2005-12-15 07:25:02 CET

* Peter Samuelson <peter@p12n.org> wrote:

> [Philip Martin]
> > 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.
> Finally I understand, and your original question seems to be completely
> moot. When you pass a path into a hook script, it has *no way* of
> knowing what the path's real encoding is (there *is* a canonical
> encoding of the path, but it isn't UTF-8, it's whatever is actually on
> the filesystem), so it *has* to assume that the path is already in the
> correct encoding. Even if the hook script were given LC_CTYPE, there's
> nothing it could do with that information anyway.

Nope. If the hook script wants to use the subversion libraries (e.g. via
bindings) to inspect the repository, it needs the path as UTF-8. Well mostly
it just works, because the repos path does consist of ascii-characters only and
nobody seemed to care so far...

> Put another way, whatever transformation the subversion server does for
> readdir() or open(), it will do the same for popen("hook-script"), so
> the hook script may as well assume the path is indeed an opaque bag of
> bytes.

... so the script *has to* treat the repos path as sequence of characters
(as opposed to bytes) in order to pass it correctly to svn_repos_open (which
turns the path back to the locale).


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Dec 15 07:25:43 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.