Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: xterm meta and bindkey



hi Stephane,
thanks for the reply.
short answer...downloading the latest zsh made it work :)  d'oh! what a newbie
mistake!

longer answer...

1/ yes you where correct, my setup was using LANG=en_US.UTF-8
   however when i set it to just en_US it still didnt work.

2/ when i upgraded to the latest version i had to change my bindkey to...
   bindkey -s 'ä' 'dirs -v'
   to get it to work, ie bindkey -s '\M-d' 'dirs -v' does not work, but that may 
   just be my lack of understanding of what multibyte support means, and anyway i
dont
   really care because i now have the functionality i want.

thanks again,
fleg.

On Mon Nov 10 21:46 , Stephane Chazelas  sent:

>On Mon, Nov 10, 2008 at 05:06:58PM +0900, lord_fleg@xxxxxxxxxxxx wrote:
>[...]
>> bindkey '\C-g' describe-key-briefly
>> 
>> then hit CTRL-g and then when it prompts me hit META-d
>> the response is "\M-C" is capitalize-word.
>> 
>> if i hit CTRL-g and META- i get the same (\M-C) response.
>> 
>> if i type 'read' and META-d i get the 8 bit character i expect echo'd.
>> 
>> if i type 'bash' and hit META-d i get the 8 bit character i expect echo'd.
>> 
>> i'm confused.  anyone got any ideas?
>[...]
>
>What do you get if you run
>
>od -tx1
>
>then type  and then 
>
>What do the "locale" and "locale charmap" commands output for
>you?
>
>What do you get if you type:  after having run
>strace -p $$ &
>
>My suspicion is that upon , your terminal doesn't send
>the  byte (d | 0x80 == 0xc4) but the utf8 sequence that
>corresponds to the unicode character .
>
>~$ echo -n '\xc4' | recode ..u8 | od -tx1
>0000000 c3 84
>0000002
>
>And c3 being the  byte.
>
>I wouldn't use Meta this way. I would tell xterm to send x
>upon  instead of sending the character  (or its
>utf8 representation).  is the é character in the
>iso8859-1 charset but in utf8 does not correspond to any valid
>character by itself which is probably why xterm chose to send
>the utf8 sequence.
>
>I suspect newer versions of zsh with multibyte charset support
>would decode that c3 84 correctly into the  character as
>long as you tell it that your terminal talks utf8 (by making
>sure locale charmap returns utf8). So it may work as you expect
>in newer zsh versions.
>
>-- 
>Stéphane
>)




Messages sorted by: Reverse Date, Date, Thread, Author