On my Windows box, I tried to create a Subversion patch by using the command svn diff > my_patch.diff
. The resulting file was encoded with UTF-16, rather than UTF-8 or ASCII, so when I tried to use patch
(from GnuWin32) to apply the patch, it didn't work.
I was able to convert the patch file to UTF8 by opening it in Notepad and saving as the desired format, and patch
handled it fine after that. But, is there a way to get svn diff
to generate UTF8 on Windows?
Update: As my answer indicates, it turns out that the problem is really unrelated to Subversion, diff
, or patch
. It was PowerShell that was oh-so-helpfully converting the output to Unicode. I'm leaving the question as-is so that someone with a similar problem might stumble upon it.