Return-Path: X-Original-To: apmail-subversion-dev-archive@minotaur.apache.org Delivered-To: apmail-subversion-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9A44A173AE for ; Fri, 24 Oct 2014 13:08:10 +0000 (UTC) Received: (qmail 31562 invoked by uid 500); 24 Oct 2014 13:08:10 -0000 Delivered-To: apmail-subversion-dev-archive@subversion.apache.org Received: (qmail 31509 invoked by uid 500); 24 Oct 2014 13:08:10 -0000 Mailing-List: contact dev-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@subversion.apache.org Received: (qmail 31499 invoked by uid 99); 24 Oct 2014 13:08:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Oct 2014 13:08:09 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of markphip@gmail.com designates 209.85.214.179 as permitted sender) Received: from [209.85.214.179] (HELO mail-ob0-f179.google.com) (209.85.214.179) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Oct 2014 13:07:44 +0000 Received: by mail-ob0-f179.google.com with SMTP id wp4so272443obc.38 for ; Fri, 24 Oct 2014 06:06:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=/MbSHK9E3LISFQ+sP9X0qU6oMtzNIkoBRDkFnLZ90BI=; b=XJsW5FiEDVg0niMAcQK8VZ79hp50pkFudjZv2Xabnk+jBaDmtDCP7vwJXcR6M1rOy2 cXi163PcmusT6ybM6vUNYz8we8YmS1AahKArohuFxpv7F3aV5o18Od+d5TC8iXWh3h1J 60ePA+pxDARdYV7FBzDkrlYB1AqTMMqI0FL+aEM/5nPniGEEfA12cqGPszNeCA0dahIb tYFMoD3FeOYxvozeIVCpfFDqXnhdmNfn3sjZjvZ7T+J0iLuqNSyZrncjGvBPQbqaPEJ5 QZf5s645+h6sprg8l/4dZUU+XUwx+DLYX6nlX1gtdQpMFYxZUUfat6kFPnkk8fCfDdWi nWwA== MIME-Version: 1.0 X-Received: by 10.60.131.239 with SMTP id op15mr3740272oeb.22.1414155973205; Fri, 24 Oct 2014 06:06:13 -0700 (PDT) Received: by 10.76.104.73 with HTTP; Fri, 24 Oct 2014 06:06:13 -0700 (PDT) Date: Fri, 24 Oct 2014 09:06:13 -0400 Message-ID: Subject: Subversion canonical URI From: Mark Phippard To: Subversion Development Content-Type: multipart/alternative; boundary=047d7b471f3e70a36c05062ad8c6 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b471f3e70a36c05062ad8c6 Content-Type: text/plain; charset=UTF-8 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: http://docs.oracle.com/javase/7/docs/api/java/net/URI.html#toASCIIString() 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. -- Thanks Mark Phippard http://markphip.blogspot.com/ --047d7b471f3e70a36c05062ad8c6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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.=C2=A0 I have never found the perfect Java method for doing this. = =C2=A0 =C2=A0In 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.=C2=A0 There are other characters like [, ], #, % i= t does not convert.=C2=A0 So it is kind of a constant battle to workaround = the differences.

I have a couple questions:
<= div>
1) Could JavaHL itself expose a Subversion library metho= d that could do this for us?=C2=A0 I assume Subversion must have some metho= d that it uses to canonicalize a URL.=C2=A0 Maybe this could just be expose= d to JavaHL.=C2=A0 Pass it a String and get back the canonical version?

2) Is the Subversion URI format governed by a specifi= c RFC?=C2=A0 Mainly asking that question for an alternative to #1.=C2=A0 If= we are searching for a better Java method to use and they mention an RFC i= t would help to find a better fit.

I am not sure i= f I am using "canonical" correctly here.=C2=A0 I assume you get t= he gist of what I am asking though.

--
Thanks<= br>
Mark Phippard
http://ma= rkphip.blogspot.com/
--047d7b471f3e70a36c05062ad8c6--