From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14192 invoked from network); 31 Jan 2005 16:20:06 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 31 Jan 2005 16:20:06 -0000 Received: (qmail 3878 invoked from network); 31 Jan 2005 16:20:00 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 31 Jan 2005 16:20:00 -0000 Received: (qmail 19028 invoked by alias); 31 Jan 2005 16:19:55 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20762 Received: (qmail 19018 invoked from network); 31 Jan 2005 16:19:54 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 31 Jan 2005 16:19:54 -0000 Received: (qmail 3463 invoked from network); 31 Jan 2005 16:19:18 -0000 Received: from out011pub.verizon.net (HELO out011.verizon.net) (206.46.170.135) by a.mx.sunsite.dk with SMTP; 31 Jan 2005 16:19:14 -0000 Received: from candle.brasslantern.com ([4.11.10.129]) by out011.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20050131161832.UATO4717.out011.verizon.net@candle.brasslantern.com> for ; Mon, 31 Jan 2005 10:18:32 -0600 Received: from candle.brasslantern.com (IDENT:schaefer@localhost [127.0.0.1]) by candle.brasslantern.com (8.12.11/8.12.11) with ESMTP id j0VGIRQu031266 for ; Mon, 31 Jan 2005 08:18:27 -0800 Received: (from schaefer@localhost) by candle.brasslantern.com (8.12.11/8.12.11/Submit) id j0VGIRPi031265 for zsh-workers@sunsite.dk; Mon, 31 Jan 2005 08:18:27 -0800 From: Bart Schaefer Message-Id: <1050131161826.ZM31264@candle.brasslantern.com> Date: Mon, 31 Jan 2005 16:18:26 +0000 In-Reply-To: <200501311146.j0VBki1g028832@news01.csr.com> Comments: In reply to Peter Stephenson "Re: UTF-8 input [was Re: PATCH: zle_params.c]" (Jan 31, 11:46am) References: <200501261806.j0QI6Q2d021854@news01.csr.com> <20050129034740.GA21742@scowler.net> <20050130010754.6F985863A@pwstephenson.fsnet.co.uk> <1050130063525.ZM24312@candle.brasslantern.com> <200501311146.j0VBki1g028832@news01.csr.com> X-Mailer: Z-Mail (5.0.0 30July97) To: Zsh hackers list Subject: Re: UTF-8 input [was Re: PATCH: zle_params.c] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Authentication-Info: Submitted using SMTP AUTH at out011.verizon.net from [4.11.10.129] at Mon, 31 Jan 2005 10:18:28 -0600 X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 On Jan 31, 11:46am, Peter Stephenson wrote: } Subject: Re: UTF-8 input [was Re: PATCH: zle_params.c] } } > Otherwise don't you have issues if what the user really means to } > bind to self-insert is a single-byte character that happens to have } > the high bit set? } } Hmmm... you mean that on a system where mbrtowc() reports that a } single-byte character is incomplete, the user might nonetheless want to } insert a single-byte character onto the command line? No. I mean, suppose the user uses the same .zshrc in both a iso-8859-* and a UTF-8 locale, and has an explicit bindkey command which is intended to work only in the iso-8859-* locale. That bindkey happens to use a character for which, in the UTF-8 locale, mbrtowc() reports incomplete. This was in part why I added the footnote asking about plans for UTF-8 in shell scripts; is it even possible to have the same .zshrc in these cases? However, I wasn't thinking very clearly, since mbrtowc() won't report incomplete for an iso-8859-* character if LC_CTYPE is set correctly. I'm still worried about the case where that bindkey exists but is for a function other than self-insert. If multibyte translation is handled by a widget at the same priority as all other widgets, that "stray" bindkey can mess up the whole scheme. } In other words, are you supposing this is some kind of fallback in } case the locale isn't set correctly, e.g. it's set to UTF-8 but on an } xterm with character set ISO-8859-1? That was probably what was in my head, but on reflection it's not really something that the shell can deal with.