From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7593 invoked from network); 15 Feb 2008 19:56:14 -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.0 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; 15 Feb 2008 19:56:14 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 33493 invoked from network); 15 Feb 2008 19:56:07 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 15 Feb 2008 19:56:07 -0000 Received: (qmail 130 invoked by alias); 15 Feb 2008 19:56:04 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24553 Received: (qmail 115 invoked from network); 15 Feb 2008 19:56:04 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 15 Feb 2008 19:56:04 -0000 Received: from flock1.newmail.ru (flock1.newmail.ru [82.204.219.207]) by bifrost.dotsrc.org (Postfix) with SMTP id E444780482A1 for ; Fri, 15 Feb 2008 20:56:00 +0100 (CET) Received: (qmail 23796 invoked from network); 15 Feb 2008 19:56:00 -0000 Received: from unknown (HELO cooker.net) (arvidjaar@newmail.ru@91.77.255.247) by smtpd.newmail.ru with SMTP; 15 Feb 2008 19:56:00 -0000 From: Andrey Borzenkov To: zsh-workers@sunsite.dk Subject: Re: Phil's prompt is not working when LANG is set to UTF-8 Date: Fri, 15 Feb 2008 22:55:58 +0300 User-Agent: KMail/1.9.6 (enterprise 0.20071123.740460) References: <20080211033116.GD19613@phoenix.nasreddine.info> <200802141300.m1ED0qOo017425@news01.csr.com> <200802152249.00467.arvidjaar@newmail.ru> In-Reply-To: <200802152249.00467.arvidjaar@newmail.ru> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1256217.FnHbDMu5PZ"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200802152255.59047.arvidjaar@newmail.ru> X-Virus-Scanned: ClamAV 0.91.2/5832/Fri Feb 15 17:26:21 2008 on bifrost X-Virus-Status: Clean --nextPart1256217.FnHbDMu5PZ Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Friday 15 February 2008, Andrey Borzenkov wrote: > On Thursday 14 February 2008, Peter Stephenson wrote: > >=20 > > Wael Nasreddine wrote: > > > Peter I couldn't install Fedora because it doesn't work with LVM over > > > DM-Crypt, have you tried my environment ?? > >=20 > > No, it seems unlikely I'm going to have time for that sort of > > time-consuming procedure which is any case speculative. It seems like > > the next step is understanding the implications of Andrei's findings > > since he's already narrowed it down. I don't currently know anything > > about the system he's talking about. > >=20 >=20 >=20 > I took liberty to move this to workers. >=20 > In case it rings the bell for anyone. Here are prompt lengths computed by > zsh for phil's prompt in ru_RU.UTF-8 locale (where there were the same > results for en_US.UTF-8 as well, so at least proper UTF-8 part is correct= ly > computed :) ) >=20 > (gdb) p rpromptw > $1 =3D 12 > (gdb) p lpromptw > $2 =3D 9 > (gdb) p lprompth > $3 =3D 2 > (gdb) p rprompth > $4 =3D 1 >=20 > that's absolutely wrong. The actual prompt lengths are (see screenshot) >=20 > lpromptw =3D 13 > rptomptw =3D 16 (it has one space in it) >=20 > this perfectly correspnds to something (zsh?) ignoring invalid characters > with high bit set. =46or sure. Src/prompt.c:countprompt() case MB_INVALID: memset(&mbs, 0, sizeof mbs); /* FALL THROUGH */ case 0: /* Invalid character or null: assume no output. */ multi =3D 0; break; Oops. I do not actually see how can we fix it except introducing prompt expansion syntax for ACS (or may be for any terminfo sequence in general) and simply assuming characters in any of them are of width 1. > In both left and right prompts there are exactly 4 of=20 > ACS chars. >=20 > I attach both left and ritgh prompts as well. >=20 --nextPart1256217.FnHbDMu5PZ Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (GNU/Linux) iEYEABECAAYFAke17k4ACgkQR6LMutpd94z48ACguPUOeS3pCcX4dnlbBweHS7zA 0igAn1D7edKf3E/rgFa3LzErAwPLfaKY =YRmY -----END PGP SIGNATURE----- --nextPart1256217.FnHbDMu5PZ--