On Sun, Jan 10, 2016 at 12:07:15PM +0100, Philipp Marek wrote: > Hi James, > > thank you very much for your patience! > > > > > > Granted, the assert is new but it's just asserting the contract of the > > > > APIs. The URIs were always supposed to be canonicalized. > > > Yeah, and I even have code that deals with a slash at the end and so on. > > > > > > The other idea is that the requirements have changed - perhaps an UTF8 > > > URL > > > like > > > file:///tmp/fsvs-test-1044/repos/trunk/ä-30305/ö-13157/§-2186 > > > isn't allowed anymore, but the non-ASCII characters have to be encoded? > > > > From what I can tell, that was always supposed to be the case. > What was? That non-ASCII needs to be encoded?
Yes. > I thought that the API is > defined for UTF8-strings, so I can understand about using urlencode for > [%\/?&] - but for "normal", printable UTF8 characters? Well, the description of svn_path_canonicalize[0] leaves vague the full specification of what transformations will be applied: This involves collapsing redundant "/./" elements, removing multiple adjacent separator characters, removing trailing separator characters, and possibly other semantically inoperative transformations. [0]: https://subversion.apache.org/docs/api/latest/svn__path_8h.html#a71d5716a18e04df175633a65ddac7809 Testing shows that the canonical version of the path does indeed encode the UTF-8 characters: $ python Python 2.7.11 (default, Dec 9 2015, 00:29:25) [GCC 5.3.1 20151205] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from svn import core >>> core.svn_path_canonicalize('file:///tmp/fsvs-test-1044/repos/trunk/ä-30305/ö-13157/§-2186') 'file:///tmp/fsvs-test-1044/repos/trunk/%C3%A4-30305/%C3%B6-13157/%C2%A7-2186' > > I'm inclined to close this as the API being used incorrectly. > So, I should just make FSVS pass eg. "ö" as "%C3%B6" instead? I'd suggest using svn_path_canonicalize (or one the more granular replacements, depending on the minimal version of SVN you want to impose). Then you know you're using a properly formed path. Cheers, -- James GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy <james...@debian.org>