From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18313 invoked from network); 5 May 2008 00:39:18 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 5 May 2008 00:39:18 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 49182 invoked from network); 5 May 2008 00:39:09 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 5 May 2008 00:39:09 -0000 Received: (qmail 22732 invoked by alias); 5 May 2008 00:39:05 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24918 Received: (qmail 22713 invoked from network); 5 May 2008 00:39:05 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 5 May 2008 00:39:05 -0000 Received: from mx.spodhuis.org (redoubt.spodhuis.org [193.202.115.177]) by bifrost.dotsrc.org (Postfix) with ESMTP id 86EF780ED172 for ; Mon, 5 May 2008 02:39:00 +0200 (CEST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=d200803; d=spodhuis.org; h=Received:Date:From:To:Cc:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:Content-Transfer-Encoding:In-Reply-To; b=xpbyI583dvcMmEeSK8WwmtAhfwY1pey7IcfYTiYLGHZADaxlEstWwxaExHXHf4ft+o7LUMHlrjxITekYBvr3uajD2hRx/TZER3cDKkVjnkijuy9mgtVSajveVk0t8+K7GDdYFET0t5OIZjEPp6W8rlLSYRvzoaHbKuAOkusZMFo=; Received: by smtp.spodhuis.org with local id 1JsojK-0001tG-V9; Mon, 05 May 2008 00:38:58 +0000 Date: Sun, 4 May 2008 17:38:58 -0700 From: Phil Pennock To: Peter Stephenson Cc: des@FreeBSD.org, Zsh Hackers' List Subject: Re: zsh 4.3.6 FreeBSD bug Message-ID: <20080505003858.GA90654@redoubt.spodhuis.org> Mail-Followup-To: Peter Stephenson , des@FreeBSD.org, Zsh Hackers' List References: <20080503073947.GA22661@redoubt.spodhuis.org> <20080504131913.5b0b0ca5@pws-pc> <20080504193746.1f663c4f@pws-pc> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20080504193746.1f663c4f@pws-pc> X-Virus-Scanned: ClamAV 0.91.2/7027/Mon May 5 00:19:45 2008 on bifrost X-Virus-Status: Clean On 2008-05-04 at 19:37 +0100, Peter Stephenson wrote: > On Sun, 4 May 2008 13:19:13 +0100 > Peter Stephenson wrote: > > I've now defined _XOPEN_SOURCE_EXTENDED to get wcwidth() even if curses > > doesn't need it, because that's an XSI function; presumably that doesn't > > want to happen on BSD either (it'll appear in the scope of the curses > > files)? If so we'll need to revise the scope of the definition you > > changed to mean never define _XOPEN_SOURCE_EXTENDED. > > I think we probably want something like this. cvs HEAD (with your fixes) builds and runs on FreeBSD 6.2/amd64. There are display glitches though; these occur both with 4.3.6 with directly hacked configure and with cvs HEAD. I don't know if these do not occur without the changes needed for amd64 when _XOPEN_SOURCE_EXTENDED is defined. It seems somewhat unusual that simply defining that behaviour flag results in mutually incompatible standard system headers. *sigh* This is with LC_CTYPE=en_US.UTF-8 and connecting remotely (iTerm on MacOS 10.4.x). Can anyone confirm if these problems, outlined below, are widely seen or a platform issue? Note the differences between EURO SIGN first and POUND SIGN first, perhaps something to do with character width: €: EURO SIGN [0x20ac] £: POUND SIGN [0xa3] Minimum steps to reproduce: ./dbg/bin/zsh -f autoload ${^fpath}/*(N-.:t) zle -N insert-composed-char bindkey '^Xk' insert-composed-char Type: k Pd k Eu See: £### Press Enter and see: zsh: command not found: £€ % Add: See: £€ [K where the blank character is ^[. Type: k Eu k Pd See: €£ erase, etc, work fine With deliberately invalid combination l- (X11 combination for £): Type: k Eu l Pd k l- See: €£ [K Cut&Paste into od(1) confirms that the blank character is ^[, so that when I paste the output into vim, it self-corrects to €£ With cursor left alone from previous output, press backspace (sends ^?) and see: €£ € The blank space is again/still an ESC. Type to redraw, see just a €. The display glitch seems to require both a wide character and a single-byte character, in UTF-8, in that order. Any wide-character followed by a single-byte character (per UTF-8 encoding) is sufficient. Is this the problem which wcwidth() should fix? I tried removing *freebsd* from the configure check, rebuild to confirm it failed, make clean, hacked Src/zshcurses.h to read: #define __wchar_t wchar_t #define __wint_t wint_t #include and this did NOT resolve the problem, despite leaving ZSH_NO_XOPEN undefined and _XOPEN_SOURCE_EXTENDED defined. Before I look any further, can someone with ready access to another UTF-8 capable platform confirm what they see with the above combining chars? Thanks, -Phil