git diff encoding issue when running via Hyper-V

Michael B. Eichorn ike at
Wed Sep 30 15:37:10 UTC 2015

On Wed, 2015-09-30 at 14:31 +0000, Dangling Pointer wrote:
> Hi, 
> When I run FreeBSD 10.1 or 10.2 x64 via Hyper-V on Windows 10, the
> encoding of `git diff` command emits cluttered text (with lots of
> "ESC[m" noise) like:
> ESC[31m-setup_dirs()ESC[m
> ESC[32m+ESC[mESC[32msetup_dirs2()ESC[m
> instead of:
> -setup_dirs()+setup_dirs2()
> I don't know what to make of it. I get this behavior in Hyper-V console
> running FreeBSD's csh and bash as well as when I SSH into the VM.
> FWIW, I have never observed this issue with CentOS and Ubuntu VM
> running on the system.
> Can somebody please let me know if this is a bug or do I need to
> configure something?

I ran into something similar with shells/fish. I was able to resolve the
problem by changing the charset on my FreeBSD machine to UTF-8 which is
probably the charset in your CentOS and Ubuntu VMs.

I dunno why or how this worked, but it might solve it. Worth a try
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5761 bytes
Desc: not available
URL: <>

More information about the freebsd-questions mailing list