I'm using both Latin1 and UTF8 encoded files in my projects. The browser showing diffs seems always to assume the UTF8 encoding, resulting in incorrectly showing non-ascii characters. Is there a way to tell SourceTree (or Git) about the encoding of a file?
Addendum: picking an encoding on a per-project basis would be sufficient rather than on a per-file basis. The reason I'm using Latin1 in some projects is that these are legal documents that I share with non-developers on Windows machines that seem to prefer it.
Actually, I take it back, there is a way to do this. You can create a .gitattributes file for the folder/pattern and define the 'encoding' setting there. This should be picked up by SourceTree in the diffs too. http://schacon.github.com/git/gitattributes.html
No. There's no practical reason to be using Latin1 encoding in 2012. While you can change the encoding in git, doing it on a per-file basis is very impractical. You'll save ourself far more pain just by standardising on UTF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.