3

My Windows's locale is Chinese/Code Page 936. When I create a patch by Tortoise SVN (even if the Tortoise SVN is in English UI), it create a patch file with header like this:

Index: C:/mypath/myfile.txt
===================================================================
--- C:/mypath/myfile.txt    (版本 3174)
+++ C:/mypath/myfile.txt    (工作副本)

The characters (工作副本) in header is GBK(CP936) encoded. And my myfile.txt is a UTF-8 file, so the content of the patch is UTF-8 encoded. The whole patch file is mixed encoded, which is bad.

How can I make the patch's header be in English and ASCII?

Yang Bo
  • 3,586
  • 3
  • 22
  • 35

1 Answers1

1

While this does not solve the TortoiseSVN problem, you can generate the patches with a command line client like Windows Powershell . You can disable the translation there, when you set the environment variable LC_ALL to C.

:: disable the translation
set LC_ALL=C
:: create the patch
svn diff {diff params} > patch.diff
Leonel Sanches da Silva
  • 6,972
  • 9
  • 46
  • 66
Rudi
  • 19,366
  • 3
  • 55
  • 77