On Thu, Sep 08, 2011 at 02:07:03PM -0400, Mark Phippard wrote: > This is a JavaHL issue. See the attached patch which resolves the > problem I face. > > If I use the JavaHL diff API to produce a patch it fails if there are > paths in the patch with UTF8 characters in the name. Here is an > example of the Exception: > > Invalid argument > svn: Can't convert string from 'UTF-8' to native encoding: > svn: Index: ?\230?\181?\139?\232?\175?\149?\230?\150?\135?\228?\187?\182.txt > ===================================================================
This might be related to the following TODO comment in libsvn_client/patch.c. In other words, this is a known limitation of the current implementation. [[[ static svn_error_t * grab_filename(const char **file_name, const char *line, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { const char *utf8_path; const char *canon_path; /* Grab the filename and encode it in UTF-8. */ /* TODO: Allow specifying the patch file's encoding. * For now, we assume its encoding is native. */ /* ### This can fail if the filename cannot be represented in the current * ### locale's encoding. */ SVN_ERR(svn_utf_cstring_to_utf8(&utf8_path, line, scratch_pool)); ]]]