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

RE: How to properly URI encode a string?

From: Balazs Wellisch <balazs_at_neusolutions.com>
Date: 2004-05-04 00:53:56 CEST

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
Received on Mon May 3 23:54:48 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.