Package: screen
Version: 5.0.2-1
Severity: normal

Fixing #215955 (UTF-8 caption corruption) revealed other UTF-8-related issues.

1. Hardstatus/caption width accounting uses byte-length instead of cell-width
   This causes alignment/padding issues with non-ASCII captions.

2. OSC forwarding path re-encodes caption payload bytes in a way that can
   corrupt data that is already UTF-8.

3. After hardstatus redraw, cursor restore can be wrong in some scenarios where
   the caption includes UTF-8 chars, leading to prompt/cursor placement
   anomalies until a redraw.

Minimal hardstatus to reproduce:

  hardstatus alwayslastline "%=%t | %c "

A non-ASCII caption (e.g. Latin-extended or emojis) triggers incorrect
layout/cursor behaviour.

Tests:
  printf '\e]0;%s\e\\' "abc ó ą ⭍ 💩"
  printf '\e]0;%s\e\\' "Fußgängerübergänge"

Reply via email to