subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko ─îibej <>
Subject Re: Subversion canonical URI
Date Fri, 24 Oct 2014 14:04:26 GMT
On 24.10.2014 15:06, Mark Phippard wrote:
> When we use the Subversion API via JavaHL it is up to the caller to
> provide repository URI in proper encoded format, such as %20 for
> spaces.  I have never found the perfect Java method for doing this.  
>  In Subclipse, we are currently using this method:
> <>
> It does a good job handling UTF8 characters, but as an example it does
> not convert spaces to %20 so we have do that ourselves.  There are
> other characters like [, ], #, % it does not convert.  So it is kind
> of a constant battle to workaround the differences.
> I have a couple questions:
> 1) Could JavaHL itself expose a Subversion library method that could
> do this for us?  I assume Subversion must have some method that it
> uses to canonicalize a URL.  Maybe this could just be exposed to
> JavaHL.  Pass it a String and get back the canonical version?
> 2) Is the Subversion URI format governed by a specific RFC?  Mainly
> asking that question for an alternative to #1.  If we are searching
> for a better Java method to use and they mention an RFC it would help
> to find a better fit.
> I am not sure if I am using "canonical" correctly here.  I assume you
> get the gist of what I am asking though.

Ideally, the JavaHL API (being "high-level") would not require
URL-encoding at the API level. But that's water below the bridge by now.
Adding encoding+decoding APIs would certainly help.

-- Brane

View raw message