This is not correct. Encodings can be resource specific. See GitDocument#populate and refactor the code for reuse here. Hopefully that code is better.

Try this in JGit to find a couple of files with their own encodings:

grep ^encoding */.settings/org.eclipse.*