Re: Bug#103619: mc: screen corruption when listing files with non-printable chars (ISO 8859-1 mode)

Hi, Martin!

> > When using "ISO 8859-1" display in MC, non-printable characters aren't
> > handled correctly. The result is that columns are shifted some
> > characters to the right (i.e. screen corruption).
> >
> > Ascii 9 (tab) is displayed as is (should be ^I).
> > Ascii 10 (tab) is displayed as is (should be ^J).

The problem is not with the interpretation of the ISO 8859-1 setting.
The problem is that the filter is not applied consistently.  The filter is
not applied to the filenames shown on the panels.

> > Ascii 1-31, 127 are displayed as ^X where X is some character. This
> > is correct, but the column is shifted one character to the right.
> > Ascii 128-159 are displayed as ~^X, but is shifted two characters to
> > the right.

It's another related problem.  MC should calculate width of the characters
on the screen using localized functions, not strlen().  But it mostly
affects languages with double byte characters, like Japanese.  Currently
mc blindly believes that 1 byte = 1 unit of width on the screen, which is
not true even on xterm, as you demonstrated, not to mention kterm.

I'm afraid that I'll not have time to fix it, but I hope that somebody
with a good understanding of multibyte characters would do it right.

Pavel Roskin

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