0d386260b4
This patch is intended to bring the master branch into closer alignment with the newlib branch functionality. The commit shown below replaced that 'escape_str' with 'escaped_copy' so that the ps program wouldn't execute some code twice. However, it created a problem for the top program when the UTF-8 encoding was not available. Unlike ps who calls the escape functions directly, top outputs those library provided strings unaltered. That means there is no workaround (like LANG=) when such an encoding was unavailable. This, in turn, can lead to a corrupted display (especially with the linux console). Now, when a UTF-8 encoding is not available, multibyte chars are converted to '?', reducing display problems. [ there's still a potential problem concerning 'cmd' ] [ should program names contain multibyte characters. ] [ unlike that newlib branch, this string is not ever ] [ altered with the '?' char under the master branch. ] Reference(s); . Dec 2020, escaoed_copy repleced most escape_str commit eea5626bb144328eb60e9ea8a29bd5b1f100ecd9 Signed-off-by: Jim Warner <james.warner@comcast.net>