Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tortoise SVN blame displays non-sense

I have a versioned .cpp file and I want to see who wrote a certain line of code so I used the Tortoise SVN blame option. But when it open the file, this what it displayed:

enter image description here

Has anyone ever encountered this problem?

P.S.

I'm using Tortoise SVN 1.8.1

like image 553
conectionist Avatar asked Aug 13 '13 10:08

conectionist


1 Answers

Judging by the first two characters, that file is in UTF-16LE, and at least a year ago, SVN did not support UTF-16 for blaming (although a patch exists). To the best of my knowledge, nothing has changed since then (so this isn't just a TortoiseSVN issue).

As far as I'm aware, there are only really two options:

  1. Recompile SVN (and TortoiseSVN) with that patch included (note that TortoiseSVN might require further changes to display everything properly)
  2. If your compilers allow you to do so, stop using UTF-16 and switch to UTF-8 (however, any changes made before that switch will not be blamed correctly, since the conversion from UTF-16 to UTF-8 changes too much in the binary representation)

Option 2 is generally preferable since it also helps anyone else using your repository, but you may need to change other things to get your cmopiler to behave properly (in case it doesn't realize it's dealing with UTF-8, which may cause problems if it has to convert to UTF-16 on Windows)

like image 113
Michael Madsen Avatar answered Nov 15 '22 03:11

Michael Madsen