On Tue, 30 Jan 2007, Michael Sinz wrote:
> MONTEUX Eric wrote:
> >I am currently developping a subversion client in C++.
> >I have a problem with blank characters existing in my file names.
> >The svn api says the url of such files is malformed.
> >How can I encode the file names in such a way that it is considered as a
> >valid url ?
> URL encoding has the file name escaped as per RFC2396. This is "%xx" where
> the xx is the hex code for the character. For example, "%20" would be a
> space and thus a file of "one space" would be "one%20space"
> All non-alpha-numeric characters or special path characters should be
> See http://www.ietf.org/rfc/rfc2396.txt
> >I also watched inside the tortoiseSvn source code, but I can't use it
> >since I need a portable (windows / linux) implementation.
> I don't remember where the function is right now (I have been playing on
> the Java side a bit too much lately and know where to do it there) but
> a conversion from UTF8 path into URL encoding should be readily available.
> See http://www.w3.org/International/O-URL-code.html
/** Return a URI-encoded copy of @a path, allocated in @a pool. */
const char *svn_path_uri_encode(const char *path, apr_pool_t *pool);
Received on Tue Jan 30 21:44:11 2007
- application/pgp-signature attachment: stored
This is an archived mail posted to the Subversion Dev