The rendering of multibyte characters in the prompt appears to have changed in recent versions and the characters are no longer rendered properly on my system.
Given the following command:
echo "Example content." | less --prompt "Example prompt ↓↑"
less v653 and earlier render the prompt as expected:
In v654, less started printing the code points in angle brackets with leading ^@ characters:
At some point this changed so the leading ^@ is now omitted in the current release version, v667, and the master branch, which currently print the code points in angle brackets:
When $LESSCHARSET is set to dos, the characters render properly, as illustrated in the following comparison:
echo "Example content." | LESSCHARSET=utf-8 less --prompt "Example prompt ↓↑"
# Example content.
# Example prompt <U+0086><U+0093><U+0086><U+0091>
echo "Example content." | LESSCHARSET=dos less --prompt "Example prompt ↓↑"
# Example content.
# Example prompt ↓↑
The system is running macOS 14.6.1 and the output of locale is:
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
Thank you for developing such a useful and important program!
The rendering of multibyte characters in the prompt appears to have changed in recent versions and the characters are no longer rendered properly on my system.
Given the following command:
lessv653 and earlier render the prompt as expected:In v654,
lessstarted printing the code points in angle brackets with leading^@characters:At some point this changed so the leading
^@is now omitted in the current release version, v667, and the master branch, which currently print the code points in angle brackets:When
$LESSCHARSETis set todos, the characters render properly, as illustrated in the following comparison:The system is running macOS 14.6.1 and the output of
localeis:Thank you for developing such a useful and important program!