With remote version control operation as the whole point of
Subversion’s existence, it makes sense that some attention has been paid
to internationalization (i18n) support. After all, while
“remote” might mean “across the office,” it
could just as well mean “across the globe.” To facilitate
this, all of Subversion’s public interfaces that accept path arguments
expect those paths to be canonicalized—which is most easily accomplished
by passing them through the svn_path_canonicalize()
function—and encoded in UTF-8. This means, for example, that any new
client binary that drives the libsvn_client interface needs to first
convert paths from the locale-specific encoding to UTF-8 before passing
those paths to the Subversion libraries, and then to reconvert any
resultant output paths from
Subversion back into the locale’s encoding before using those paths for
non-Subversion purposes. Fortunately, Subversion provides a suite of
functions (see subversion/include/svn_utf.h) that any
program can use to do these conversions.
Also, Subversion APIs require all URL parameters to be properly
URI-encoded. So, instead of passing file:///home/username/My
File.txt
as the URL of a file named My File.txt, you need to pass
file:///home/username/My%20File.txt
. Again, Subversion
supplies helper functions that
your application can use—svn_path_uri_encode()
and svn_path_uri_decode()
, for URI encoding and decoding, respectively.