title: error: unmappable character for encoding UTF8 after GIT merge
body: <p>After yet another git pull my project stopped building with bunch of messages:</p>
  
  <pre><code>error: unmappable character for encoding UTF-8
  </code></pre>
  
  <p>The messages point to the copyright symbol found in some of the files headers. There are many more files with same symbol but they seem to compile fine. When viewing in binary editor the good one appears as:</p>
  
  <p>C2 A9 </p>
  
  <p>while bad one</p>
  
  <p>A9 </p>
  
  <p>When viewing in vim both are shown as © (&lt;©> 169, Hex 00a9, Octal 251) but IntelliJ Idea shows bad ones as diamond. </p>
  
  <p>So I decided that I have messed something when merging (there were merge conflicts after pull) and went to look what files where changed with </p>
  
  <pre><code>git diff-tree --no-commit-id --name-only -r --full-index --binary 91cbe7b753d39905372c1ea41e04e7a3dbd2566e
  </code></pre>
  
  <p>but it produces no results. No changes found for the previous commit too. The log looks like this:</p>
  
  <pre><code>commit 91cbe7b753d39905372c1ea41e04e7a3dbd2566e
  Merge: d7b4ae9 0dfc198
  Author: Me Me &lt;my.my@gmail.com&gt;
  Date:   Wed Dec 23 17:50:46 2015 +0100
  
      Merge branch 'development' of ssh://fsstash.cool.com:7999/our/server into my-branch
  
  commit 0dfc19850b2e31d72c1d2923321430e8fc1b53cb
  Merge: 724b8a7 d3478f9
  Author: Good Guy &lt;Good.Guy@gmail.com&gt;
  Date:   Wed Dec 23 14:34:33 2015 +0200
  
      Merge branch 'development' of ssh://fsstash.cool.com:7999/our/server into development
  </code></pre>
  
  <p>when I do git checkout 0dfc19850b2e31d72c1d2923321430e8fc1b53cb everything compiles fine.</p>
  
  <p>So the question is: how can I fix it?</p>
  
  <p>By fix I mean understanding what's happend and reapplying the pull changes (maybe) so that I wouldn't have to commit anything related to this fix into upstream repo.</p>
  
  <p>It seems like the bad one is UTF-16 (0x00A9) while good one is UTF-8 - (0xC2 0xA9). What might have changed it?</p>
  
  <p>Build system is maven, but it's not related as same error reported by bare javac on copied and minified file. The os is ubuntu 15.10, locale says this:</p>
  
  <pre><code>locale
  LANG=ru_RU.UTF-8
  LANGUAGE=ru:en
  LC_CTYPE="ru_RU.UTF-8"
  LC_NUMERIC=ru_UA.UTF-8
  LC_TIME=ru_UA.UTF-8
  LC_COLLATE="ru_RU.UTF-8"
  LC_MONETARY=ru_UA.UTF-8
  LC_MESSAGES="ru_RU.UTF-8"
  LC_PAPER=ru_UA.UTF-8
  LC_NAME=ru_UA.UTF-8
  LC_ADDRESS=ru_UA.UTF-8
  LC_TELEPHONE=ru_UA.UTF-8
  LC_MEASUREMENT=ru_UA.UTF-8
  LC_IDENTIFICATION=ru_UA.UTF-8
  LC_ALL=
  </code></pre>
  
  <p>java -version: 1.8.0_66.</p>
  
  <p>Any help is highly appreciated!</p>
  
  <p>PS: tried all --diff-algorithm={patience|minimal|histogram|myers} - still no changes found by git-diff-tree</p>
  
  <p>PS: <code>git reset --hard HEAD~1, git pull origin developemnt</code> issued from the command line didn't help, so not related to Idea.</p>