Steve Wills wrote:
On 11/28/19 4:08 PM, Mark Millard via svn-src-head wrote:
Author: daichi
Date: Fri Sep 20 17:37:23 2019
New Revision: 352558
URL:
https://svnweb.freebsd.org/changeset/base/352558


Log:
   top(1): support multibyte characters in command names (ARGV array)
   depending on locale.
    - add setlocale()
    - remove printable() function
    - add VIS_OCTAL and VIS_SAFE to the flag of strvisx() to display
      non-printable characters that do not use C-style backslash sequences
      in three digit octal sequence, or remove it
   This change allows multibyte characters to be displayed according to
   locale. If it is recognized as a non-display character according to the
   locale, it is displayed in three digit octal sequence.


Initially picking on tab characters as an example of what is
probably a somewhat broader issue . . .

Ever since this change, characters like tabs that do not fit
in the next character cell when output, but for which they
are !isprintable(...), now mess up the top display. Again
using tab as an example: line wrapping from the text having
been shifted over by more than one character cell. top does
not track the line wrapping result in how it decides what
to output for the following display updates.


Apologies for the way late reply here, but I just now bothered tracking this down. This commit seems to be the cause of some corruption I'm seeing in long running top(1) as well. As Mark mentions, if I use "hh" it clears up. Should I open a bugzilla bug? I can share screenshots of the corruption, such as:

https://i.imgur.com/Xqlwf9h.png
https://i.imgur.com/Jv0d5NU.png

Does removing VIS_SAFE fixes the issue for you?

As for original Mark's report (which I missed), removing isprintable() doesn't look wrong as vis(3) should take of its functionality (and in multibyte-aware way).

Also, is there an easy way to reproduce this?
_______________________________________________
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to