GIT checkout shows files with wrong encoding

In the end, the question may be completely dumb, but ...

I have a local GIT repository on Win 7 running GIT on the Windows command line. All files are in UTF-8 (no BOM), texts contain non-ASCII characters (German, Russian, etc.), So send messages. At some point, I needed to recall some data from past commits, which are in non-ASCII characters. But both gitk and git checkout <commit-hash>

show files in non-UTF-8 encoding (default ANSI according to Notepad ++), of course breaking UTF-8 characters only. Reverting to HEAD restores the file encoding.

Am I missing something? GIT settings might need to be done. I am assuming the GIT files are not UTF-8 and therefore cannot have such characters.

I should also mention that the non-ASCII commit messages work fine ( git log

and gitk shows them correctly, although I haven't changed the cmd encoding).

Thank!


Edit: This is what my files look like in gitk or when checked out (note the symbols in the comment line):

@import 'reset';
@import 'mixins';
@import 'animations';
@import 'variables';
@import 'helpers';

/* ==================== Ђ„‚‹ ==================== */
@font-face{
    font-family:'ClearSans';
    src:url('../fonts/ClearSans-Medium.eot');
    src:url('../fonts/ClearSans-Medium.eot?#iefix') format('embedded-opentype'),
         url('../fonts/ClearSans-Medium.woff') format('woff'),
         url('../fonts/ClearSans-Medium.ttf') format('truetype'),
         url('../fonts/ClearSans-Medium.svg') format('svg');
    font-weight:normal;
    font-style:normal;
}

      

+3


source to share





All Articles