From owner-freebsd-questions@freebsd.org Wed Sep 30 14:57:55 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A60D6A0CE91 for ; Wed, 30 Sep 2015 14:57:55 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66EDE188E for ; Wed, 30 Sep 2015 14:57:54 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de (port-92-195-125-111.dynamic.qsc.de [92.195.125.111]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id 9C7E32780F; Wed, 30 Sep 2015 16:57:45 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id t8UEviLK002123; Wed, 30 Sep 2015 16:57:44 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Wed, 30 Sep 2015 16:57:44 +0200 From: Polytropon To: Dangling Pointer Cc: "freebsd-questions@freebsd.org" Subject: Re: git diff encoding issue when running via Hyper-V Message-Id: <20150930165744.3437d751.freebsd@edvax.de> In-Reply-To: References: Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Sep 2015 14:57:55 -0000 On Wed, 30 Sep 2015 14:31:36 +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. This looks like color codes... > Can somebody please let me know if this is a bug or do I need to > configure something? The pager (and the attached terminal emulator) should be able to convert those codes (Escape, [, code sequence) into something meaningful, usually a change of display attributes such as color, inverse, underlined (or whatever the terminal supports). In your case, those are displayed as-is. Standard FreeBSD installations usually display them as desired: -setup_dirs() <--- red text +setup_dirs2() <--- green text Note that "ESC" is wrong (or probably just a display replacement for a non-printable character): The character has to be the ESC code (ASCII #27 or 0x1b), as seen here: 00000000 1b 5b 33 31 6d 2d 73 65 74 75 70 5f 64 69 72 73 |.[31m-setup_dirs| 00000010 28 29 1b 5b 6d 0a 1b 5b 33 32 6d 2b 1b 5b 6d 1b |().[m..[32m+.[m.| 00000020 5b 33 32 6d 73 65 74 75 70 5f 64 69 72 73 32 28 |[32msetup_dirs2(| 00000030 29 1b 5b 6d 0a |).[m.| Maybe your input data got mangled somehow and the ESC character replaced by the string "ESC", just as hexdump represents it as a "." in the ASCII output column? -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...