From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14157 invoked from network); 13 Jan 2006 02:24:03 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.0 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 13 Jan 2006 02:24:03 -0000 Received: (qmail 3184 invoked from network); 13 Jan 2006 02:23:56 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 13 Jan 2006 02:23:56 -0000 Received: (qmail 28844 invoked by alias); 13 Jan 2006 02:23:53 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22161 Received: (qmail 28835 invoked from network); 13 Jan 2006 02:23:51 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 13 Jan 2006 02:23:51 -0000 Received: (qmail 2861 invoked from network); 13 Jan 2006 02:23:51 -0000 Received: from dsl3-63-249-88-2.cruzio.com (HELO dot.blorf.net) (63.249.88.2) by a.mx.sunsite.dk with SMTP; 13 Jan 2006 02:23:49 -0000 Received: by dot.blorf.net (Postfix, from userid 1000) id 63ED29554; Thu, 12 Jan 2006 18:23:47 -0800 (PST) Date: Thu, 12 Jan 2006 18:23:47 -0800 From: Wayne Davison To: zsh-workers@sunsite.dk Subject: Re: mangling of non-ascii char in prompt Message-ID: <20060113022347.GA32762@dot.blorf.net> References: <20060112022950.GA24042@scowler.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060112022950.GA24042@scowler.net> User-Agent: Mutt/1.5.11 On Wed, Jan 11, 2006 at 09:29:50PM -0500, Clint Adams wrote: > % LANG=hr_HR.UTF-8 > % PS1="%D{%a}%# " The problem appears to be that the UTF-8 string coming from %D{%a} is not being metafied, so zputs() is outputting the string wrong. The above PS1 setting on a Thursday results in this 4-char string being assigned to lpromptbuf: \304\254et The second character does not pass the itok() test, so it is skipped, mangling the output. If I assign the above 4-character string directly to PS1 via a variable, the second character is properly metafied: \304\203\254et And the string outputs correctly. ..wayne..