Hi, When creating patches for files whose path contain characters not representable in the current locale's code page, then TortoiseSVN will replace these characters with '?'. E.g. if you have English set up as the current code page and a file name with Japanese characters, then the diff header of the patch will contain an invalid path and thus render the patch unusable.
The root issue here is that when executing `svn_client_diff7`, we pass `APR_LOCALE_CHARSET` as the header encoding. This will cause Subversion to use the current thread's locale, which is any one of the ANSI code pages. As these cannot by design represent all characters but only a limited subset, this will fail in the above described scenario. Fix the issue by instead specifying "UTF-8" as diff header encoding. Like this, we are able to represent all possible paths independent of the currently set up system locale. As Subversion will internally convert diff header paths to UTF-8 anyway, this is the safest bet to fix the issue without any unexpected side effects. Please find the attached patch, which implements the fix. Regards Patrick -- You received this message because you are subscribed to the Google Groups "TortoiseSVN-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tortoisesvn-dev/20190917062506.GA147288%40ncase.
Index: src/SVN/SVN.cpp
===================================================================
--- src/SVN/SVN.cpp (revision 28658)
+++ src/SVN/SVN.cpp (working copy)
@@ -1500,7 +1500,7 @@
propertiesonly,
useGitFormat,
prettyprint,
- APR_LOCALE_CHARSET,
+ "UTF-8",
outstream,
errstream,
NULL, // we don't deal with change lists when
diffing
signature.asc
Description: PGP signature

