zsh-workers
 help / color / mirror / code / Atom feed
From: Wael Nasreddine <mla@nasreddine.com>
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 21:10:46 +0100	[thread overview]
Message-ID: <20080215201046.GB5802@phoenix.nasreddine.info> (raw)
In-Reply-To: <200802152249.00467.arvidjaar@newmail.ru>

[-- Attachment #1: Type: text/plain, Size: 2245 bytes --]

This One Time, at Band Camp, Andrey Borzenkov <arvidjaar@newmail.ru> said, On Fri, Feb 15, 2008 at 10:48:55PM +0300:
> On Thursday 14 February 2008, Peter Stephenson wrote:

> > Wael Nasreddine wrote:
> > > Peter I couldn't install Fedora because it doesn't work with LVM over
> > > DM-Crypt, have you tried my environment ??

> > 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.



> I took liberty to move this to workers.

> 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 correctly
> computed :) )

> (gdb) p rpromptw
> $1 = 12
> (gdb) p lpromptw
> $2 = 9
> (gdb) p lprompth
> $3 = 2
> (gdb) p rprompth
> $4 = 1

> that's absolutely wrong. The actual prompt lengths are (see screenshot)

> lpromptw = 13
> rptomptw = 16 (it has one space in it)

> this perfectly correspnds to something (zsh?) ignoring invalid characters
> with high bit set. In both left and right prompts there are exactly 4 of
> ACS chars.

> I attach both left and ritgh prompts as well.

> ^[[1m^[[36m^[[11m?^[[1m^[[34m?^[[10m(^[[1m^[[36mbor^[[1m^[[33m@^[[1m^[[32mcooker^[[1m^[[33m:^[[1m^[[34m1^[[1m^[[34m)^[[11m?^[[1m^[[36m?                                                                                                       ^[[1m^[[34m?^[[10m(^[[1m^[[35m~^[[1m^[[34m)^[[11m?^[[1m^[[36m?^[[10m
> ^[[1m^[[36m^[[11m?^[[1m^[[34m?^[[10m(^[[1m^[[33m22:51^[[34m:^[[1m^[[37m%^[[1m^[[34m)^[[11m?^[[10m^[[1m^[[36m^[[11m?^[[10m^[[0;10m 
>  ^[[1m^[[36m^[[11m?^[[1m^[[34m?^[[10m(^[[1m^[[33m??????,??????14^[[1m^[[34m)^[[11m?^[[1m^[[36m?^[[10m^[[0;10m

So it does seem a zsh problem after all, file a bug perhaps?

-- 
Wael Nasreddine
http://wael.nasreddine.com
PGP: 1024D/C8DD18A2 06F6 1622 4BC8 4CEB D724  DE12 5565 3945 C8DD 18A2

.: An infinite number of monkeys typing into GNU emacs,
   would never make a good program. (L. Torvalds 1995) :.

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2008-02-15 22:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080211033116.GD19613@phoenix.nasreddine.info>
     [not found] ` <20080214123757.GA2943@phoenix.nasreddine.info>
     [not found]   ` <200802141300.m1ED0qOo017425@news01.csr.com>
2008-02-15 19:48     ` Andrey Borzenkov
2008-02-15 19:55       ` Andrey Borzenkov
2008-02-15 20:10       ` Wael Nasreddine [this message]
2008-02-15 23:52 Fw: " Peter Stephenson
2008-02-16 19:13 ` Bart Schaefer
2008-02-17 16:43   ` Peter Stephenson
2008-02-17 17:40     ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080215201046.GB5802@phoenix.nasreddine.info \
    --to=mla@nasreddine.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).