From owner-freebsd-questions@freebsd.org Wed Sep 30 15:54:38 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 D1340A0B95A for ; Wed, 30 Sep 2015 15:54:38 +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 951961EE0 for ; Wed, 30 Sep 2015 15:54:38 +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 A3CB82780F; Wed, 30 Sep 2015 17:54:36 +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 t8UFsaNm002265; Wed, 30 Sep 2015 17:54:36 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Wed, 30 Sep 2015 17:54:36 +0200 From: Polytropon To: Dangling Pointer Cc: "freebsd-questions@freebsd.org" Subject: Re: git diff encoding issue when running via Hyper-V Message-Id: <20150930175436.c1117526.freebsd@edvax.de> In-Reply-To: References: <20150930165744.3437d751.freebsd@edvax.de> 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 15:54:39 -0000 On Wed, 30 Sep 2015 15:27:23 +0000, 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. > Should those be considered as standard installation? Yes. As far as I know, they don't have any customization related to terminal emulation and paging. As it has been suggested by Michael B. Eichorn, you can try setting a different than the standard (US) character set and encoding, even though this _should_ not have anything to do with the problem you're seeing. For example, 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. However, make sure - just to be _really_ sure - that your Git output hasn't been mangled and there are _real_ ESC characters in it, 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. ;-) Regarding terminal capabilities (and color support in this context) you can simply try this: % echo "This is ^[[31mred^[[m text." When you encounter the sequence ^[, press Ctrl+V, then Escape. This will escape the escape character, and ^[ will be shown. You should see the word "red" in red color. If not - well, _then_ you're beginning to see an existing problem. :-) > 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)? No, not related, but a separate problem. It's easy to resolve. Depending on your shell, and let's assume the C shell is still your default interactive shell: Go to the /etc/csh.cshrc file (global C shell configuration) and add after the "if ( $?tcsh ) then" block: bindkey ^? delete-char # for console bindkey ^[[3~ delete-char # for xterm Now the DEL key will work as expected. You can verify the correct setting with the "stty -a" command. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...