That can be handled by gitattributes already. Something like this should help:<p><pre><code>    [diff &quot;the_file_extension&quot;]
        textconv = the_conversion_tool
        binary = true
</code></pre>
You just need to find&#x2F;write the conversion utility you need. iconv could do that with `iconv -f UTF-16 -t your-terminal-encoding`