From owner-freebsd-questions@freebsd.org Wed Sep 30 16:22:05 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 13466A0C97C for ; Wed, 30 Sep 2015 16:22:05 +0000 (UTC) (envelope-from danglingpointer@outlook.com) Received: from BAY004-OMC2S7.hotmail.com (bay004-omc2s7.hotmail.com [65.54.190.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "*.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F21391A9C for ; Wed, 30 Sep 2015 16:22:04 +0000 (UTC) (envelope-from danglingpointer@outlook.com) Received: from BAY169-W71 ([65.54.190.123]) by BAY004-OMC2S7.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Wed, 30 Sep 2015 09:21:57 -0700 X-TMN: [qZSIIbQGpX5rDLRKuc8H9b0JxXTPW8TJ] X-Originating-Email: [danglingpointer@outlook.com] Message-ID: From: Dangling Pointer To: Polytropon CC: "freebsd-questions@freebsd.org" Subject: RE: git diff encoding issue when running via Hyper-V Date: Wed, 30 Sep 2015 16:21:57 +0000 Importance: Normal In-Reply-To: <20150930175436.c1117526.freebsd@edvax.de> References: , <20150930165744.3437d751.freebsd@edvax.de>, , <20150930175436.c1117526.freebsd@edvax.de> MIME-Version: 1.0 X-OriginalArrivalTime: 30 Sep 2015 16:21:57.0857 (UTC) FILETIME=[20DD0510:01D0FB9C] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 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 16:22:05 -0000 Thanks guys. Here is what I have found: # cat ~/.login_conf me:\ :charset=3DUTF-8:\ :lang=3Den_US.UTF-8: I created this file then logged back in and ran: # locale LANG=3Den_US.UTF-8 LC_CTYPE=3D"en_US.UTF-8" LC_COLLATE=3D"en_US.UTF-8" LC_TIME=3D"en_US.UTF-8" LC_NUMERIC=3D"en_US.UTF-8" LC_MONETARY=3D"en_US.UTF-8" LC_MESSAGES=3D"en_US.UTF-8" LC_ALL=3D # echo "This is ^[[31mred^[[m text." prints red colored "red" text. :) # git diff &1> ../blah.txt # cat ../blah.txt shows: [...] -setup_dirs() +setup_dirs2() [...] but # git diff still emits the mangled output on stdout. The delete-key solution resolved my issue. Thanks a bunch Polytropon! > Date: Wed=2C 30 Sep 2015 17:54:36 +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 >=20 > On Wed=2C 30 Sep 2015 15:27:23 +0000=2C Dangling Pointer wrote: >> 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.=20 >> Should those be considered as standard installation?=20 >=20 > Yes. As far as I know=2C they don't have any customization related > to terminal emulation and paging. >=20 > As it has been suggested by Michael B. Eichorn=2C you can try setting > a different than the standard (US) character set and encoding=2C even > though this _should_ not have anything to do with the problem you're > seeing. >=20 > For example=2C I could verify the correct working of the color codes > in a normal xterm and on the text mode console with LC_ALL set to > the (german) setting en_US.ISO8859-1. You could try en_US.UTF-8 > as well. >=20 > However=2C make sure - just to be _really_ sure - that your Git output > hasn't been mangled and there are _real_ ESC characters in it=2C by > dumping some output to a temporary file and checking it with the > "hexdump -C " command as shown in my previous message. > Verify that you aren't trying to solve a problem which does not > exist. =3B-) >=20 > Regarding terminal capabilities (and color support in this context) > you can simply try this: >=20 > % echo "This is ^[[31mred^[[m text." >=20 > When you encounter the sequence ^[=2C press Ctrl+V=2C then Escape. This > will escape the escape character=2C and ^[ will be shown. >=20 > You should see the word "red" in red color. If not - well=2C _then_ > you're beginning to see an existing problem. :-) >=20 >=20 >=20 >> Maybe it is related to keyboard layout as when I press Del key in >> text editor or command line=2C I get tilde (~) sign instead of getting >> character at cursor deleted (so I use Backspace for deletion which >> works perfectly fine)? >=20 > No=2C not related=2C but a separate problem. It's easy to resolve. > Depending on your shell=2C and let's assume the C shell is still > your default interactive shell: >=20 > Go to the /etc/csh.cshrc file (global C shell configuration) > and add after the "if ( $?tcsh ) then" block: >=20 > bindkey ^? delete-char # for console > bindkey ^[[3~ delete-char # for xterm >=20 > Now the DEL key will work as expected. You can verify the > correct setting with the "stty -a" command. >=20 >=20 >=20 >=20 > --=20 > Polytropon > Magdeburg=2C Germany > Happy FreeBSD user since 4.0 > Andra moi ennepe=2C Mousa=2C ... > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe=2C send any mail to "freebsd-questions-unsubscribe@freebsd= .org" =