• Bug#265416: bash: readline and wide characters broken in 3.0

    From Marc Lehmann@1:229/2 to All on Fri Aug 13 10:20:08 2004
    From: [email protected]

    Package: bash
    Version: 3.0-4
    Severity: normal

    I recently upgraded to bash-3.0-4, and found that bash no longer is able
    to interactively edit lines with double-wide characters (and in some
    case other non-latin1-characters, although cases are more difficult to reproduce).

    Working with LC_CTYPE=de_DE.UTF-8 (and no other LC_* nor LANG env var set), I get this on entering
    "12\x{672c}34" (perl syntax, that's "1 2 U+672C 3 4").

    cerebro ~# 12本34
    ^

    cursor is marked with ^. Moving the cursor to the left successively gives:

    cerebro ~# 12本34
    ^
    cerebro ~# 12本34
    ^
    cerebro ~# 12本34
    ^ # jumped one chaarcter too far
    cerebro ~# 12本34
    ^
    cerebro ~# 12本34
    ^ # one character left to the left margin

    As you can see, the cursor jumps over the 本, and I can even go one
    step further to the left than my original prompt (which ends with a
    space). Backspace acts the same: for every double-wide character, I get
    one cell further to the left, and backspacing a double-wide character
    erases the character itself and one more character to the left.

    With bash-2.05b and an otherwise identical system the cursor correctly
    moves on top of the 本 and is displayed properly, editing works
    correctly.

    While this manifests most easily with double-wide characters I have
    the impression that high characters in general are a problem for bash,
    as I think that I have this behaviour sometimes when entering other
    unicode characters, but I cna only easily reproduce it with double-width characters.

    -- System Information:
    Debian Release: 3.1
    APT prefers testing
    APT policy: (700, 'testing'), (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686)
    Kernel: Linux 2.6.6
    Locale: LANG=C, LC_CTYPE=de_DE.UTF-8

    Versions of packages bash depends on:
    ii base-files 3.1 Debian base system miscellaneous f hi libc6 2.3.2.ds1-11 GNU C Library: Shared libraries an ii libncurses5 5.4-4 Shared libraries for terminal hand ii passwd 1:4.0.3-30 Change and administer password and

    -- no debconf information


    --
    To UNSUBSCRIBE, email to [email protected]
    with a subject of "unsubscribe". Trouble? Contact [email protected]

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)