Date: Wed, 30 Sep 2015 15:27:23 +0000 From: Dangling Pointer <danglingpointer@outlook.com> To: Polytropon <freebsd@edvax.de> Cc: "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org> Subject: RE: git diff encoding issue when running via Hyper-V Message-ID: <BAY169-W427D636EB4B23950789C1BA74D0@phx.gbl> In-Reply-To: <20150930165744.3437d751.freebsd@edvax.de> References: <BAY169-W424C7A9E96B8530A5BCAF0A74D0@phx.gbl>, <20150930165744.3437d751.freebsd@edvax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks Polytropon for your reply. I am seeing this issue with these image as are (by only installing `git` and no other alterations made to the OS whatsoever): ftp://ftp.freebsd.org/pub/FreeBSD/releases/VM-IMAGES/10.2-RELEASE/amd64/Latest/FreeBSD-10.2-RELEASE-amd64.vhd.xz.ftp://ftp.freebsd.org/pub/FreeBSD/releases/VM-IMAGES/10.1-RELEASE/amd64/Latest/FreeBSD-10.1-RELEASE-amd64.vhd.xz. Should those be considered as standard installation? Maybe it is related to keyboard layout as when I press Del key in text editor or command line, I get tilde (~) sign instead of getting character at cursor deleted (so I use Backspace for deletion which works perfectly fine)? > Date: Wed, 30 Sep 2015 16:57:44 +0200 > From: freebsd@edvax.de > To: danglingpointer@outlook.com > Subject: Re: git diff encoding issue when running via Hyper-V > CC: freebsd-questions@freebsd.org > > 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, ... > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BAY169-W427D636EB4B23950789C1BA74D0>
