Is there an existing issue for this?
Midnight Commander version and build configuration
Operating system
Is this issue reproducible using the latest version of Midnight Commander?
How to reproduce
Create a file that contains some non-printable Unicode character (e.g. U+FEFF or U+10FFFF) encoded in UTF-8, perhaps followed by a few ASCII letters.
Start mcedit with an 8-bit locale (and the same 8-bit charset in the terminal). Open the file with UTF-8 as the file's encoding (this is the default, verify with Alt-E).
The said Unicode character is displayed as a single dot. Press the right arrow to jump over this character. The cursor moves by 3 or 4 columns, corresponding to the number of bytes in the UTF-8 sequence.
Insert new letters, or just observe the shown character code in the header: the cursor is consistently shown at the wrong offset. While on the display (the terminal's contents) the said character occupies 1 column, the cursor jumps as if that character occupied 3-4 columns.
Expected behavior
.
Actual behavior
.
Additional context
No response
Is there an existing issue for this?
Midnight Commander version and build configuration
Operating system
Is this issue reproducible using the latest version of Midnight Commander?
How to reproduce
Create a file that contains some non-printable Unicode character (e.g. U+FEFF or U+10FFFF) encoded in UTF-8, perhaps followed by a few ASCII letters.
Start
mceditwith an 8-bit locale (and the same 8-bit charset in the terminal). Open the file with UTF-8 as the file's encoding (this is the default, verify with Alt-E).The said Unicode character is displayed as a single dot. Press the right arrow to jump over this character. The cursor moves by 3 or 4 columns, corresponding to the number of bytes in the UTF-8 sequence.
Insert new letters, or just observe the shown character code in the header: the cursor is consistently shown at the wrong offset. While on the display (the terminal's contents) the said character occupies 1 column, the cursor jumps as if that character occupied 3-4 columns.
Expected behavior
.
Actual behavior
.
Additional context
No response