zsh-workers
 help / color / mirror / code / Atom feed
From: Jordan Breeding <jordan.breeding@mac.com>
To: Peter Stephenson <pws@csr.com>
Cc: zsh-workers@sunsite.dk
Subject: Re: problems with 4.3.4 and Tru64
Date: Fri, 11 May 2007 09:23:13 -0700	[thread overview]
Message-ID: <2DF07A7A-0112-1000-86BB-08869130C191-Webmail-10013@mac.com> (raw)
In-Reply-To: <200705110928.l4B9Sobe019086@news01.csr.com>

On Friday, May 11, 2007, at 04:29AM, "Peter Stephenson" <pws@csr.com> wrote:
>Phil Pennock wrote:
>> > > If these display fine, then multibyte is working and parts of zle are
>> > > working; the problem will be in input processing.  If these don't
>> > > display, then the problem's not in the input processing.
>> > 
>> >  Touche, that works!
>> > 
>> >  Now, how to fix input processing?-)
>
>The fact they display doesn't tell you very much.  You also need to
>check that once you've got them on the command line they behave like a
>single character.  The easiest way is just to move the cursor and check
>it doesn't go to far (which it will if doesn't recognise the two bytes
>as a single character).
>
>If that's really working, input processing is quite involved to check.
>The key function for this is getrestchar() in Src/Zle/zle_main.c.  This
>should recognise the first byte is an incomplete character and the
>second byte completes it.  I don't think this an easy way to avoid
>debugging the insides.
>

<snipped>

Hello,

I have been following this thread as it interests me since I have had trouble getting multibyte to work the way I would expect on OS X.  This thread inspired me to dig a little deeper since I can always see the characters, but with multibyte on echo/printf didn't seem to like the combined characters, and with multibyte off the line editor can't keep straight that it is one character.  I will file a bug report with Apple to turn on multibyte in zsh now since in zsh 4.3.4 it seems to work fine.  The other problems I was having were caused by preexec().  I had some print() statments in precmd() and preexec().  precmd() and chpwd() seem to have no effect on whether multibyte works or not, but this preexec():

preexec() {
  print -Pn "\e]2;%n@%m %0~ (%30>...>${1}%>>%)\a"
}

causes echo/print to misbehave.

My test case was to do `echo h<combined character>lp` where the combined character is either <option-u>e or <ctrl-x k>e:

with the preexec enabled I get:
<combined character>h<combined character>lp

as the output, without it it just echoes exactly what it should.  So I think for the most part my problems are solved now.  It would be nice to still be able to use preexec, but I assume that hopefully that bug can be fixed in the future.

Jordan


  reply	other threads:[~2007-05-11 16:24 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-10  8:25 Timo Aaltonen
2007-05-10  9:55 ` Peter Stephenson
2007-05-10 10:05   ` Peter Stephenson
2007-05-10 10:06   ` Timo Aaltonen
2007-05-10 10:15     ` Timo Aaltonen
2007-05-10 10:30       ` Peter Stephenson
2007-05-10 11:03         ` Timo Aaltonen
2007-05-10 11:30           ` Peter Stephenson
2007-05-10 11:43             ` Timo Aaltonen
2007-05-10 11:55               ` Peter Stephenson
2007-05-10 13:05                 ` Timo Aaltonen
2007-05-10 13:35                   ` Peter Stephenson
2007-05-13 20:12             ` Peter Stephenson
2007-05-13 23:43               ` Wayne Davison
2007-05-10 17:55 ` Phil Pennock
2007-05-10 19:24   ` Timo Aaltonen
2007-05-10 22:26     ` Phil Pennock
2007-05-11  9:28       ` Peter Stephenson
2007-05-11 16:23         ` Jordan Breeding [this message]
2007-05-11 17:25           ` Jordan Breeding
2007-05-11 17:56             ` Peter Stephenson
2007-05-11 18:42               ` Jordan Breeding

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=2DF07A7A-0112-1000-86BB-08869130C191-Webmail-10013@mac.com \
    --to=jordan.breeding@mac.com \
    --cc=pws@csr.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).