Wrong cursor position in terminal with two or three bit UTF-8 characters (like umlauts)

  • I often work with librelec over terminal and have an issue which drives my crazy:

    When I have a line in the terminal with an umlaut and move the cursor over it the terminal looses the cursor position.

    This only occurs with Libreelec and not with other systems I remote to.

    Example (with _ indicating cursor position)

    LibreELEC:~ # üb_

    Move cursor all the way left

    LibreELEC:~ #_ üb

    Move Cursor all they way right

    LibreELEC:~ #üb_b

    If I use a thai unicode character (which requires three bits to encode) the line shifts by two positions each time.

    This makes it very difficult to rename a file for example.

    Anybody knows what causes this and how to fix it?

    I tried:

    Different Terminal emulators like Konsole, xterm, xfce-terminal

    Setting environment vars LC_CTYPE and LANG to en_US.UTF-8