Reputation: 21
I'm looking for the answer for strange character in git show like in the screen:
I have the same issue in git diff.
my .gitconfig file:
[user]
name = user
email = [email protected]
[difftool "sourcetree"]
cmd = '' \"$LOCAL\" \"$REMOTE\"
[mergetool "sourcetree"]
cmd = "'' "
trustExitCode = true
[credential "https://...."]
provider = generic
[core]
editor = code --wait
[diff]
tool = vscode
[difftool "vscode"]
cmd = "code --wait --diff $LOCAL $REMOTE"
Edited: I found the answer here : https://stackoverflow.com/a/36692549/12733938 but what strange it works for almost all files. Some still have same strange letter but for now is ok.
Upvotes: 2
Views: 805
Reputation: 61
The file you had committed in git is not UTF-8 encoded. It looks like UTF-16 LE BOM encoding which is typically in windows. So you have to change the encoding to UTF-8 to fix your "strange character" problem.
Upvotes: 1