HomeFreeBSD

top(1): support multibyte characters in command names (ARGV array)

Description

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.

Reference:
https://www.mail-archive.com/svn-src-all@freebsd.org/msg165751.html
https://www.mail-archive.com/svn-src-all@freebsd.org/msg165766.html
https://www.mail-archive.com/svn-src-all@freebsd.org/msg165833.html
https://www.mail-archive.com/svn-src-all@freebsd.org/msg165846.html
https://www.mail-archive.com/svn-src-all@freebsd.org/msg165891.html

Submitted by: hrs
Differential Revision: https://reviews.freebsd.org/D16204