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
===================================================================

RA layer request failed
svn: Error reading spooled REPORT request response


The problem seems to be that JavaHL creates the output file for the
patch with the encoding of SVN_APR_LOCALE_CHARSET.  If I change this
to "utf-8" as shown in the patch then the method works.

The command line client from the same system works fine.

How do people feel about this?  Does it make sense that JavaHL should
create the patch file with UTF-8 encoding?  I tend to think it does,
but thought I would raise the question here.

-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/
Index: subversion/bindings/javahl/native/SVNClient.cpp
===================================================================
--- subversion/bindings/javahl/native/SVNClient.cpp     (revision 1166827)
+++ subversion/bindings/javahl/native/SVNClient.cpp     (working copy)
@@ -987,7 +987,7 @@
                                    showCopiesAsAdds,
                                    force,
                                    FALSE,
-                                   SVN_APR_LOCALE_CHARSET,
+                                   "utf-8",
                                    outfile,
                                    NULL /* error file */,
                                    changelists.array(subPool),
@@ -1019,7 +1019,7 @@
                                showCopiesAsAdds,
                                force,
                                FALSE,
-                               SVN_APR_LOCALE_CHARSET,
+                               "utf-8",
                                outfile,
                                NULL /* error file */,
                                changelists.array(subPool),

Reply via email to