Tortoise SVN blame displays non-sense

1.7k views Asked by At

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

2

There are 2 answers

0
Michael Madsen On BEST ANSWER

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)

0
Lazy Badger On

Some exotic charset or non-text file? Did you tried svn cat this file?

UTF8 without BOM, SVN 1.8.1

Blame window