You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Balazs Wellisch <ba...@neusolutions.com> on 2004/05/03 18:41:15 UTC

How to properly URI encode a string?

Hello everyone,

Does anyone know how to specify directory names with spaces on Linux? When I
try to execute the following statement I get an error:

svn import /tmp file:///home/svnroot/Project\ Name -m 'Initial layout';

I get the error:

svn: URL 'file:///home/svnroot/Project Name' is not properly URI-encoded

So how do I properly URL Encode such a string? I'd be very grateful for some
PERL code to get this done.

TIA,

Balazs




-----Original Message-----
From: Branko Cibej [mailto:brane@xbc.nu] 
Sent: Monday, May 03, 2004 11:26 AM
To: Hernán Martínez Foffani
Cc: users@subversion.tigris.org
Subject: Re: db_recover win32 binaries anyone?

Hernán Martínez Foffani wrote:

>I couldn't find Windows precompiled BerkeleyDB db* tools
>anywhere.  Does anyone know where to get those?
>  
>
They're available from the Subversion site:

http://subversion.tigris.org/files/documents/15/8848/db-4.2.52-win32.zip

>For SVN 1.0.1 they has to be BDB 4.2.52, right?
>  
>
Yes.

I don't know if the tools will help you, though; "svnadmin recover" does 
the same thing as "db_recover".

-- Brane



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


RE: How to properly URI encode a string?

Posted by Balazs Wellisch <ba...@neusolutions.com>.
Thanks everyone for the heads up. I actually found a perl function that will
take care of this for me.

use URI::Escape;
$mystring = uri_escape($mystring);

I also saw a reference to an svn function (svn_path_uri_encode) in the book
but I couldn't get this to work. However, since the perl function works my
problem is solved!

Thanks,

Balazs


-----Original Message-----
From: Ben Collins-Sussman [mailto:sussman@collab.net] 
Sent: Monday, May 03, 2004 1:49 PM
To: Balazs Wellisch
Cc: users@subversion.tigris.org
Subject: Re: How to properly URI encode a string?

On Mon, 2004-05-03 at 13:41, Balazs Wellisch wrote:
> Hello everyone,
> 
> Does anyone know how to specify directory names with spaces on Linux? When
I
> try to execute the following statement I get an error:
> 
> svn import /tmp file:///home/svnroot/Project\ Name -m 'Initial layout';
> 
> I get the error:
> 
> svn: URL 'file:///home/svnroot/Project Name' is not properly URI-encoded
> 
> So how do I properly URL Encode such a string? I'd be very grateful for
some
> PERL code to get this done.

The URL encoding for space is %20:

svn import /tmp file:///home/svnroot/Project%20Name -m 'Initial layout'



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to properly URI encode a string?

Posted by Ben Collins-Sussman <su...@collab.net>.
On Mon, 2004-05-03 at 13:41, Balazs Wellisch wrote:
> Hello everyone,
> 
> Does anyone know how to specify directory names with spaces on Linux? When I
> try to execute the following statement I get an error:
> 
> svn import /tmp file:///home/svnroot/Project\ Name -m 'Initial layout';
> 
> I get the error:
> 
> svn: URL 'file:///home/svnroot/Project Name' is not properly URI-encoded
> 
> So how do I properly URL Encode such a string? I'd be very grateful for some
> PERL code to get this done.

The URL encoding for space is %20:

svn import /tmp file:///home/svnroot/Project%20Name -m 'Initial layout'



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org