[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash strangeness with utf-8

From: Giraud
Subject: Re: bash strangeness with utf-8
Date: Sun, 08 Jul 2007 09:13:27 -0600
User-agent: Thunderbird (X11/20070629)

Hi Benno,

Here is the output from "locale":


The following prompt is set in my .bashrc (but the same behavior happens
if I do not set it or set it to a simple string, so I don't think this

        PS1="\[\033[33m\]\h-\u\[\033[36m\] [\w] (\!)\[\033[00m\] "

PROMPT_COMMAND is not set.

I have attached a script in which I caused the two cases I talked about
in my first mail.  I started the script, and then:

1) hit up arrow (to get to previous command, which was "cd")
  (cursor now at end, after "cd" - expected)
2) hit right arrow twice
  (no visible change - cursor still at end - expected)
3) hit left arrow once
  (cursor does not move - strange!)
4) hit left arrow again
  (now cursor moves back one - should have moved back at step #3 above)
5) with cursor between "c" and "d" now, hit ctrl-k
  ("d" disappears - exptected)
6) hit right arrow repeatedly
  (cursor moves back and forth (left & right) one char position
   - first over "c", then after, then repeating - with each
   right arrow hit - strange!)
7) hit down arrows to end of history, then hit ctrl-d to get out
   of script

Hope the above is clear and that the script helps.

                                -Joe (lavajoe at gentoo)

Benno Schulenberg wrote:
> Joe Peterson wrote:
>> when using LAN=en_US.UTF-8 (anf we've verified same on
>> en_GB.UTF-8).
> Apart from LANG=en_US.UTF-8, what is the rest of your locale?
>> There are two cases I came up with.  If you up-arrow through your
>> history, hit right-arrow (i.e. going "past" the end - even though
>> the cursor stops at the end), it takes 2 left-arrows to go back a
>> character (as if there were an extra character at the end).
>> Case 2 can usually be invoked by going back a character or two,
>> hitting ctrl-k (to chop off the end of the line), and then
>> hitting right-arrow repeatedly.  The cursor will oscillate back
>> and forth at the end of the line (well, I can almost always get
>> this to happen...).
> Cannot reproduce either case.  Can you provide examples in the form 
> of a typescript (using 'script')?
> Benno

Attachment: bash_utf.script
Description: Binary data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]